diff options
Diffstat (limited to 'backend/hist_data/enwiki/download_img_license_info.py')
| -rwxr-xr-x | backend/hist_data/enwiki/download_img_license_info.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/hist_data/enwiki/download_img_license_info.py b/backend/hist_data/enwiki/download_img_license_info.py index 6fd710c..3ef20fb 100755 --- a/backend/hist_data/enwiki/download_img_license_info.py +++ b/backend/hist_data/enwiki/download_img_license_info.py @@ -10,6 +10,7 @@ at already-processed names to decide what to skip. """ import argparse +import os import re import time import signal @@ -18,7 +19,8 @@ import urllib.parse import html import requests -IMG_DB = 'img_data.db' +ENWIKI_DIR = os.path.dirname(os.path.realpath(__file__)) +IMG_DB = os.path.join(ENWIKI_DIR, 'img_data.db') API_URL = 'https://en.wikipedia.org/w/api.php' USER_AGENT = 'terryt.dev (terry06890@gmail.com)' |
