473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Screenscraping, in python, a web page that requires javascript?


Is there a method, with python, of screenscraping a web page, if that web
page uses javascript?

I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
HTML that doesn't have embedded javascript.

Thanks!

Aug 9 '07 #1
1 1523
Dan Stromberg - Datallegro <ds********@datallegro.comwrites:
Is there a method, with python, of screenscraping a web page, if that web
page uses javascript?
Not pure CPython, no.

I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for
HTML that doesn't have embedded javascript.
It's not that BeautifulSoup is unhappy with JS, it's just that there's
no support for executing the JS.

There are some Java libraries that know how to execute JS embedded in
web pages, which could be used from Jython:

http://www.thefrontside.net/crosscheck

http://htmlunit.sourceforge.net/

http://httpunit.sourceforge.net/
You can also automate a browser, but that still seems to be painful in
one way or another.
John
Aug 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
3
by: John Draper | last post by:
I am having a lot of problems trying to get a Python CGI to run. I have included 3 parts... 1) A simple stripped down python module. 2) An output of what I get when I do: python index.py...
17
by: MilkmanDan | last post by:
I'll be a college freshman this fall, attending Florida Institute of Tech studying electrical engineering. I was considering taking some classes in programming and computer science, and I...
1
by: Philipp Lenssen | last post by:
Hi! I'm having some problems correctly screenscraping and outputting e.g. Chinese characters from a Google translator search result. The output is always a garbled mess, not Chinese characters....
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
0
by: Laszlo Nagy | last post by:
John Chandler wrote: - Use firefox :-) - Install "LiveHTTPHeaders" http://livehttpheaders.mozdev.org/ - Open the plugin in one window and the website in another - Enable "capture" in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.