Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 599143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:27:57+00:00 2026-05-13T16:27:57+00:00

Does Python have screen scraping libraries that offer JavaScript support? I’ve been using pycurl

  • 0

Does Python have screen scraping libraries that offer JavaScript support?

I’ve been using pycurl for simple HTML requests, and Java’s HtmlUnit for more complicated requests requiring JavaScript support.

Ideally I would like to be able to do everything from Python, but I haven’t come across any libraries that would allow me to do it. Do they exist?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:27:58+00:00Added an answer on May 13, 2026 at 4:27 pm

    There are many options when dealing with static HTML, which the other responses cover. However if you need JavaScript support and want to stay in Python I recommend using webkit to render the webpage (including the JavaScript) and then examine the resulting HTML. For example:

    import sys
    import signal
    from PyQt4.QtCore import *
    from PyQt4.QtGui import *
    from PyQt4.QtWebKit import QWebPage
    
    class Render(QWebPage):
        def __init__(self, url):
            self.app = QApplication(sys.argv)
            QWebPage.__init__(self)
            self.html = None
            signal.signal(signal.SIGINT, signal.SIG_DFL)
            self.connect(self, SIGNAL('loadFinished(bool)'), self._finished_loading)
            self.mainFrame().load(QUrl(url))
            self.app.exec_()
    
        def _finished_loading(self, result):
            self.html = self.mainFrame().toHtml()
            self.app.quit()
    
    
    if __name__ == '__main__':
        try:
            url = sys.argv[1]
        except IndexError:
            print 'Usage: %s url' % sys.argv[0]
        else:
            javascript_html = Render(url).html
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Python have a built-in, simple way of encoding/decoding strings using a password? Something
I have a Python script that loads a web page using urllib2.urlopen , does
I have a Python program (with Django - does this matter?) that I want
Does Javascript or jQuery have sometime like the in statement in Python? a in
Does Python have a function equivalent to scheme's apply? I notice that Python's reduce
Does python have a build-in (meaning in the standard libraries) to do a split
Does python have a built-in function that converts a matrix into row echelon form
Does python have immutable lists? Suppose I wish to have the functionality of an
Does Python have a pool of all strings and are they (strings) singletons there?
As python does not have concept of constants, would it be possible to raise

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.