from zlib_dl import ZLibSession
import re

s1 = ZLibSession(verbose=True)
resp1 = s1._request_download("https://zlib.li/book/22909249/a93325")
match = re.search(r'href="(/dl/[^"]+)"', resp1.text)
if match:
    print("Found exact link:", match.group(1))
else:
    print("Could not find /dl/ link in HTML!")
    
    lines = [line.strip() for line in resp1.text.split('\n')]
    for i, line in enumerate(lines):
        if "download" in line.lower() or "href" in line.lower():
            if "/22909249/" in line:
                print(f"Possible DL Line [{i}]: {line[:300]}")
