uppercase IPv6

This commit is contained in:
BennyThink 2022-03-12 15:21:18 +08:00
parent 296efdbd1b
commit 49095af268
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ from config import APP_HASH, APP_ID, PYRO_WORKERS, TOKEN
def create_app(session="ytdl", workers=PYRO_WORKERS): def create_app(session="ytdl", workers=PYRO_WORKERS):
_app = Client(session, APP_ID, APP_HASH, _app = Client(session, APP_ID, APP_HASH,
bot_token=TOKEN, workers=workers, bot_token=TOKEN, workers=workers,
ipv6=os.getenv("ipv6", False), ipv6=os.getenv("IPv6", False),
# proxy={"hostname": "host.docker.internal", "port": 1080} # proxy={"hostname": "host.docker.internal", "port": 1080}
) )

View file

@ -202,7 +202,7 @@ def ytdl_download(url, tempdir, bm) -> dict:
adjust_formats(chat_id, url, formats) adjust_formats(chat_id, url, formats)
add_instagram_cookies(url, ydl_opts) add_instagram_cookies(url, ydl_opts)
address = ["::", "0.0.0.0"] if os.getenv("ipv6") else [None] address = ["::", "0.0.0.0"] if os.getenv("IPv6") else [None]
for format_ in formats: for format_ in formats:
ydl_opts["format"] = format_ ydl_opts["format"] = format_