mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-13 20:47:57 +01:00
json ext for translations
This commit is contained in:
parent
ec10d811e6
commit
d0c78eaff4
1 changed files with 3 additions and 0 deletions
|
@ -556,6 +556,9 @@ async def _crawl(url: str, session: aiohttp.ClientSession, output_dir: str):
|
|||
if is_hashable_only or is_sucking_file:
|
||||
ext = ''
|
||||
|
||||
if re.search(TRANSLATIONS_EN_CATEGORY_URL_REGEX, url):
|
||||
ext = '.json'
|
||||
|
||||
filename = os.path.join(output_dir, *url_parts) + ext
|
||||
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue