We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62c9d2f commit 7af431dCopy full SHA for 7af431d
imdb_backup.py
@@ -2,6 +2,7 @@
2
3
import os
4
import re
5
+import sys
6
import time
7
import zipfile
8
from pathlib import Path
@@ -31,7 +32,9 @@ def slugify(s: str) -> str:
31
32
33
34
def load_imdb_cookies():
- script_path = Path(__file__).resolve().parent
35
+ """Read an IMDb 'id' cookie from the folder containing the script or executable."""
36
+ # https://pyinstaller.readthedocs.io/en/stable/runtime-information.html#using-sys-executable-and-sys-argv-0
37
+ script_path = Path(sys.argv[0]).resolve().parent
38
cookie_path = script_path / COOKIE_FNAME
39
40
if cookie_path.exists():
0 commit comments