+ Recoded entire codebase
+ Added proper README.md
This commit is contained in:
parent
302999189d
commit
d1c02e5b62
8 changed files with 585 additions and 252 deletions
14
utils/helpers.py
Normal file
14
utils/helpers.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import re
|
||||
import html
|
||||
import datetime
|
||||
import pytz
|
||||
|
||||
def get_future_datetime(days_ahead=3, hour="13:00:00"):
|
||||
dt = datetime.datetime.now(pytz.timezone('Europe/Berlin')) + datetime.timedelta(days=days_ahead)
|
||||
return dt.strftime(f"%Y-%m-%dT{hour}+02:00")
|
||||
|
||||
def extract_html_value(text, pattern):
|
||||
match = re.search(pattern, text)
|
||||
if not match:
|
||||
raise ValueError(f"Pattern not found: {pattern}")
|
||||
return html.unescape(match.group(1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue