Allows to get an HTML, passing previously for several URL. This is sometimes needed because some webpages need cookies or a HTTP referrer to get a certain page.
Project description
Allows to get an HTML, passing previously for several URL. This is sometimes needed because some webpages need cookies or a HTTP referrer to get a certain page.
For example:
>>> ## start the console
>>> from html_jumping import html_jumping
>>> self.handler = html_jumping()
>>> config = {
'route': [
['http://pypi.python.org/pypi', 'GET' ],
['http://pypi.python.org/pypi', 'GET', {
'term': 'html_jumping',
':action': 'search',
'submit': 'search'
}]
]
}
>>> received_header, received_content = self.handler.get(config)
To use it you will need:
- httplib2
To run the test you will also need:
- lxml
For example:
>>> ## start the console
>>> from html_jumping import html_jumping
>>> self.handler = html_jumping()
>>> config = {
'route': [
['http://pypi.python.org/pypi', 'GET' ],
['http://pypi.python.org/pypi', 'GET', {
'term': 'html_jumping',
':action': 'search',
'submit': 'search'
}]
]
}
>>> received_header, received_content = self.handler.get(config)
To use it you will need:
- httplib2
To run the test you will also need:
- lxml
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
html_jumping-0.1.tar.gz
(2.0 kB
view hashes)