# Instalatiom `sh pip install webdownloader ` # Downloader ### Basic functional `python from webdownloader import Downloader downloader = Downloader() page_content = downloader.get_page('https://www.google.com/') len(page_content) # or you can return full response response = downloader.get_page('https://www.google.com/', full_response=True) response.status_code # by default it will create 3 attempts to open connection if there is a problem with a server, but you can use custom amount response = downloader.post_page('https://www.some-not-reliable-site.com/', specific_attempts_count=5) ` ### Proxies usage `python from webdownloader import Downloader downloader = Downloader(proxy_string_list=['104.144.176.1:3128', '102.152.145.103:3128', '157.152.145.103:3128'], change_proxies_manually=True) # from one random proxy (if one of proxies is not working it will take another one) page_content = downloader.get_page('https://www.google.com/') # from the same proxy page_content = downloader.get_page('https://www.google.com/') # from random proxy downloader.change_proxies() page_content = downloader.get_page('https://www.google.com/') `` ### Cookies and headers `python from webdownloader import Downloader downloader = Downloader() # cookies as a dict page_content = downloader.get_page('https://www.google.com/', cookies={'TOKEN': '1234567890'}) # cookies as a string (from browser) page_content = downloader.get_page('https://www.google.com/', cookies_text='CONSENT=YES+UK.en+; SID=somesid') # by default there is a user agent in headers but you can change all headers page_content = downloader.get_page('https://www.google.com/', headers={'User-Agent': 'Mozilla/5.0'}) # get session sookies session_cookies_dict = downloader.get_session_cookies() # save cookies to file downloader.save_cookies_to_file(session_cookies_dict, name='mycookies') # load cookies from file cookies_dict = downloader.get_cookies_from_file(name='mycookies') `` # License MIT
Release files for webdownloader 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| webdownloader-0.1.2.tar.gz | 4.5 kB | Details |
Release files / webdownloader-0.1.2.tar.gz
| Download URL | webdownloader-0.1.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f76661fbd5f4ecf2ec8bae7672a60fb991b8432905bf84fc9768ea2ee9be2862
|
|
BLAKE2b-256 checksum How to use checksums |
5c11241c80e6ae5f8117d81c2ff1e586c205a2c907da9217503836c69e4279bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|