mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2025-02-24 23:34:44 +08:00
detect cookie file size
This commit is contained in:
parent
da5ae16aee
commit
b8157dc1ff
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ class YoutubeDownload(BaseDownloader):
|
|||
}
|
||||
# setup cookies for youtube only
|
||||
if self._url.startswith("https://www.youtube.com/") or self._url.startswith("https://youtu.be/"):
|
||||
if os.path.isfile("youtube-cookies.txt"):
|
||||
if os.path.isfile("youtube-cookies.txt") and os.path.getsize("youtube-cookies.txt") > 100:
|
||||
# src/cookies.txt
|
||||
ydl_opts["cookiefile"] = "youtube-cookies.txt"
|
||||
|
||||
|
|
Loading…
Reference in a new issue