diff options
author | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:55:26 -0500 |
---|---|---|
committer | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:55:26 -0500 |
commit | e44078ca6532d90dbfc273beba104842ee9670cf (patch) | |
tree | c03bafdda142eeeaeee4a4e81b0f61234918f663 | |
parent | 428efd92c9d58f5b6ef6436d5e5ed5934546636b (diff) | |
download | dilbertRss-e44078ca6532d90dbfc273beba104842ee9670cf.tar.gz dilbertRss-e44078ca6532d90dbfc273beba104842ee9670cf.tar.bz2 dilbertRss-e44078ca6532d90dbfc273beba104842ee9670cf.zip |
enable tor support
-rw-r--r-- | __pycache__/main.cpython-311.pyc | bin | 0 -> 3012 bytes | |||
-rwxr-xr-x | main.py | 16 |
2 files changed, 3 insertions, 13 deletions
diff --git a/__pycache__/main.cpython-311.pyc b/__pycache__/main.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..31ab1b1 --- /dev/null +++ b/__pycache__/main.cpython-311.pyc @@ -28,20 +28,10 @@ async def root(): adapter = HTTPAdapter(max_retries=retry) session.mount('http://', adapter) session.mount('https://', adapter) + session.proxies = {'http': 'socks5://127.0.0.1:9050', 'https': 'socks5://127.0.0.1:9050'} + + search = session.get("https://dilbert.com/strip/" + date) - session.get("https://dilbert.com/strip/" + date) - - tries = 25 - for i in range(tries): - search = requests.get("https://dilbert.com/strip/" + date) - if search.status_code == 503: - if i < tries - 1: - time.sleep(1) - continue - else: - raise - break - soup = bs4.BeautifulSoup(search.text, features="lxml") comicTitle = soup.find("meta", property="og:title")["content"] comicURL = soup.find("meta", property="og:image")["content"] |