Spaces:
Paused
Paused
Commit ·
9de8641
1
Parent(s): 4f32be3
detect cookie file size
Browse files- src/engine/generic.py +1 -1
src/engine/generic.py
CHANGED
|
@@ -92,7 +92,7 @@ class YoutubeDownload(BaseDownloader):
|
|
| 92 |
}
|
| 93 |
# setup cookies for youtube only
|
| 94 |
if self._url.startswith("https://www.youtube.com/") or self._url.startswith("https://youtu.be/"):
|
| 95 |
-
if os.path.isfile("youtube-cookies.txt"):
|
| 96 |
# src/cookies.txt
|
| 97 |
ydl_opts["cookiefile"] = "youtube-cookies.txt"
|
| 98 |
|
|
|
|
| 92 |
}
|
| 93 |
# setup cookies for youtube only
|
| 94 |
if self._url.startswith("https://www.youtube.com/") or self._url.startswith("https://youtu.be/"):
|
| 95 |
+
if os.path.isfile("youtube-cookies.txt") and os.path.getsize("youtube-cookies.txt") > 100:
|
| 96 |
# src/cookies.txt
|
| 97 |
ydl_opts["cookiefile"] = "youtube-cookies.txt"
|
| 98 |
|