initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from zlib_dl import ZLibSession
|
||||
s = ZLibSession(verbose=True, proxy_url="socks5://127.0.0.1:10800")
|
||||
# Hit the detail page manually
|
||||
resp = s._request_download("https://zlib.li/book/mDJxkg7yO6/%E6%B5%AA%E6%BD%AE%E4%B9%8B%E5%B7%85%E7%AC%AC%E5%9B%9B%E7%89%88.html")
|
||||
print(f"STATUS CODE: {resp.status_code}")
|
||||
print(f"FINAL URL: {resp.url}")
|
||||
content = resp.text
|
||||
print(f"CONTENT LENGTH: {len(content)}")
|
||||
if '/dl/' in content:
|
||||
print("FOUND /dl/ literally in content!")
|
||||
else:
|
||||
print("NO /dl/ FOUND!")
|
||||
|
||||
import re
|
||||
links = re.findall(r'href="(.*?)"', content)
|
||||
print("Some links found on page:")
|
||||
for l in [x for x in links if 'book' in x or 'dl' in x or 'download' in x][:10]:
|
||||
print(" - ", l)
|
||||
|
||||
if "daily limit" in content.lower() or "limit reached" in content.lower() or "已达下载" in content:
|
||||
print("HIT RATE LIMIT MESSAGE ON DETAIL PAGE!")
|
||||
Reference in New Issue
Block a user