N
N
nobilix2012-08-11 20:44:49
Python
nobilix, 2012-08-11 20:44:49

Headless browser under Python to execute automatic instructions by the browser?

Actually the task consists in the following.
A program is being written where you need to perform certain actions with the site (not a parser):
- authorization
- filling out forms
- text analysis
The requirements are:
- Python API
- not a very large size of the solution
- "quiet mode", you do not need to defiantly open browser windows
- ( desirable) for the site, it all should look like the actions are performed by a regular user (adequate header, clicks instead of submitting the finished form, etc.)
- ease of writing instructions
In general, all this resembles Web Browser Automation. But windowless and lightweight.
I tried Selenium WebDriver (HtmlUnit), but firstly it is heavy (30+ meters only a jar-nick that needs to be run as a server separately so that you can use it from python), and secondly it does not work quite adequately with js.
Selenium itself, for example, with firefox webdriver, in principle, suits, but it is not headless, i.e. does everything explicitly by opening and closing browser windows.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
gelas, 2012-08-12
@gelas

Spynner
or just QtWebkit
although, in my opinion, urllib is a good fit here

M
muslimov, 2012-08-11
@muslimov

- Python API
Is this the most critical point of the requirements? If not, then I have a silver bullet for you = casperJs.org

P
pfalcon, 2012-08-12
@pfalcon

Classics of the era before Web2.0 - pypi.python.org/pypi/mechanoid/
Well, in our terrible time, there are really only bindings for Webkit, here 's a demo.

A
ajaxtelamonid, 2012-08-12
@ajaxtelamonid

If you can abstract from running js, look at grablib.org/
If you need js, then the easiest way is phantomjs (with or without Casper) or zombie.js. Well, or put up with selenium.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question