woob.browser.profiles
¶
- class Profile[source]¶
Bases:
object
A profile represents the way Browser should act. Usually it is to mimic a real browser.
- setup_session(session)[source]¶
Change default headers, set up hooks, etc.
Warning: Do not enable lzma, bzip or bzip2, sdch encodings as python-requests does not support it yet. Supported as of 2.2: gzip, deflate, compress. In doubt, do not change the default Accept-Encoding header of python-requests.
- class Weboob(version=None)[source]¶
Bases:
Profile
Deprecated since version 3.4: Don’t use this profile, use
Woob
instead.- setup_session(session)[source]¶
Change default headers, set up hooks, etc.
Warning: Do not enable lzma, bzip or bzip2, sdch encodings as python-requests does not support it yet. Supported as of 2.2: gzip, deflate, compress. In doubt, do not change the default Accept-Encoding header of python-requests.
- class Woob(version=None)[source]¶
Bases:
Profile
It’s us! Recommended for Woob-friendly websites only.
- setup_session(session)[source]¶
Change default headers, set up hooks, etc.
Warning: Do not enable lzma, bzip or bzip2, sdch encodings as python-requests does not support it yet. Supported as of 2.2: gzip, deflate, compress. In doubt, do not change the default Accept-Encoding header of python-requests.
- class Firefox[source]¶
Bases:
Profile
Try to mimic a specific version of Firefox. Ideally, it should follow the current ESR Firefox: https://www.mozilla.org/en-US/firefox/organizations/all.html Do not change the Firefox version without checking the Gecko one!
- class GoogleBot[source]¶
Bases:
Profile
Try to mimic Googlebot. Keep in mind there are ways to authenticate real Googlebot IPs.
You will most likely want to set ALLOW_REFERRER to False.
- class Wget(version='1.11.4')[source]¶
Bases:
Profile
Common alternative user agent. Some websites will give you a version with less JavaScript. Some others could ban you (after all, wget is not a real browser).
- setup_session(session)[source]¶
Change default headers, set up hooks, etc.
Warning: Do not enable lzma, bzip or bzip2, sdch encodings as python-requests does not support it yet. Supported as of 2.2: gzip, deflate, compress. In doubt, do not change the default Accept-Encoding header of python-requests.
- class IPhone(application)[source]¶
Bases:
Profile
An iphone profile for mobile websites and some API websites
- setup_session(session)[source]¶
Change default headers, set up hooks, etc.
Warning: Do not enable lzma, bzip or bzip2, sdch encodings as python-requests does not support it yet. Supported as of 2.2: gzip, deflate, compress. In doubt, do not change the default Accept-Encoding header of python-requests.