Feat: download in main file

This commit is contained in:
2025-01-06 23:18:33 +03:00
parent fa05f39b24
commit 5b68cd7c01
7 changed files with 74 additions and 4 deletions

View File

@@ -1 +1,4 @@
from anixarttierlist.api import download_image, get_image_url
from anixarttierlist.group import group_by_common_part
from anixarttierlist.prepare import prepare
from anixarttierlist.tools import add_url_to_file

View File

@@ -0,0 +1,6 @@
import os
def prepare():
if not os.path.exists('./temp'):
os.mkdir('./temp')

3
anixarttierlist/tools.py Normal file
View File

@@ -0,0 +1,3 @@
def add_url_to_file(url: str, path: str = './temp/urls.txt'):
with open(path, 'a+') as file:
file.write(url+'\n')