🚸 Пропуск оригиналов файлов при создании БД

Создал .env.example для скрипта генерирующего Бд
This commit is contained in:
2021-03-29 16:15:30 +03:00
parent 4ed72b49b9
commit 975ac24c6f
2 changed files with 3 additions and 1 deletions

View File

@@ -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'}):