diff --git a/archive/.env.example b/archive/.env.example new file mode 100644 index 0000000..28d971f --- /dev/null +++ b/archive/.env.example @@ -0,0 +1,2 @@ +HOST_NAME=Имя хозяина архива +HOST_URL=Ссылка на хозяина архива \ No newline at end of file diff --git a/archive/main.py b/archive/main.py index f9158be..d2ce212 100644 --- a/archive/main.py +++ b/archive/main.py @@ -11,7 +11,7 @@ client = MongoClient(host="localhost", port=27017) db = client.vk_bingo for filename in os.listdir(DIRECTORY): - if filename.endswith(".html"): + if filename.startswith("UTF8") and filename.endswith(".html"): soup = BeautifulSoup(open(DIRECTORY+filename), "html.parser") for attch_desc in soup.find_all('div', attrs={'class': 'attachment__description'}):