diff options
Diffstat (limited to 'backend/hist_data/enwiki/download_imgs.py')
| -rwxr-xr-x | backend/hist_data/enwiki/download_imgs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/hist_data/enwiki/download_imgs.py b/backend/hist_data/enwiki/download_imgs.py index e484b33..686f912 100755 --- a/backend/hist_data/enwiki/download_imgs.py +++ b/backend/hist_data/enwiki/download_imgs.py @@ -20,8 +20,9 @@ import sqlite3 import urllib.parse import requests -IMG_DB = 'img_data.db' # About 130k image names -OUT_DIR = 'imgs' +ENWIKI_DIR = os.path.dirname(os.path.realpath(__file__)) +IMG_DB = os.path.join(ENWIKI_DIR, 'img_data.db') # About 130k image names +OUT_DIR = os.path.join(ENWIKI_DIR, 'imgs') LICENSE_REGEX = re.compile(r'cc0|cc([ -]by)?([ -]sa)?([ -][1234]\.[05])?( \w\w\w?)?', flags=re.IGNORECASE) USER_AGENT = 'terryt.dev (terry06890@gmail.com)' |
