фикс парсера времени
- фикс парсера времени для старых панелей
This commit is contained in:
@@ -156,10 +156,13 @@ async def handle_subscription(request, old_subscription=False):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
parts = meta.split("-")
|
parts = meta.split("-")
|
||||||
candidate = parts[-1] if parts else ""
|
candidate = parts[-1].strip() if parts else ""
|
||||||
candidate_decoded = urllib.parse.unquote(candidate)
|
candidate_decoded = urllib.parse.unquote(candidate)
|
||||||
# Ищем формат "11D,1H", либо "1H"
|
m = re.search(
|
||||||
m = re.search(r'(?:(\d+)D,?)?(\d+)H', candidate_decoded)
|
r'(?:(\d+)\s*[Dd]\s*,?\s*)?(\d+)\s*[Hh][^\d]*',
|
||||||
|
candidate_decoded,
|
||||||
|
re.IGNORECASE
|
||||||
|
)
|
||||||
if m:
|
if m:
|
||||||
d = int(m.group(1)) if m.group(1) else 0
|
d = int(m.group(1)) if m.group(1) else 0
|
||||||
h = int(m.group(2))
|
h = int(m.group(2))
|
||||||
|
|||||||
Reference in New Issue
Block a user