How to use Python to interface with Web pages?
alex23
wuwei23 at gmail.com
Wed Jul 8 03:29:32 EDT 2009
On Jul 8, 1:18 pm, Peter <peter.milli... at gmail.com> wrote:
> I can see the web-page source - it looks to be javascript (to my
> untutored eye :-)).
>
> But how do I enter data and "simulated" mouse presses on a web-page
> that I have accessed via a Python program?
> [...]
> I have (in the past) written some python to scoop data off web-sites
> but I have never written anything that interactively interacts with
> the web-page contents and don't know where to even start on this one.
I don't have much experience with it, but for interacting with
javascript-heavy pages you might want to take a look at Selenium:
http://seleniumhq.org/
http://pypi.python.org/pypi/selenium
http://jimmyg.org/blog/2009/getting-started-with-selenium-and-python.html
http://joker.linuxstuff.pl/documentation/make_selenium
It's primarily aimed at testing web app UIs, but if it allows for
values to be passed into tests then 'test' == 'action' in terms of
your requirements.
Hope this helps.
- alex23
More information about the Python-list
mailing list