Add missing requirement and set locale to German
This commit is contained in:
parent
e2ab2cdffd
commit
c6d39ee579
@ -1,4 +1,3 @@
|
||||
# scraperoog
|
||||
# Requirements
|
||||
|
||||
`apt install python3-pydantic python3-httpx python3-bs4 locales-all`
|
||||
`sudo locale-gen`
|
||||
`apt install python3-pydantic python3-httpx python3-bs4 python3-tqdm locales-all && sudo locale-gen`
|
||||
|
@ -2,6 +2,7 @@ import asyncio
|
||||
import csv
|
||||
import json
|
||||
import locale
|
||||
locale.setlocale(locale.LC_TIME, "German") # dates on that page are German
|
||||
import pickle
|
||||
import platform
|
||||
from configparser import ConfigParser
|
||||
@ -74,7 +75,6 @@ def generate_csv(result: Result) -> None:
|
||||
|
||||
|
||||
def convert_to_datestring(day: str, month: str, year: str) -> datetime:
|
||||
locale.setlocale(locale.LC_TIME, "")
|
||||
date = datetime.strptime(f"{day.zfill(2)} {month} {year}", "%d %B %Y")
|
||||
return date
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user