Closed garret1317 closed 10 months ago
need:
20230607062200
- YYYYMMMDDhhmmss - 29-hour time is valid - handled in ShareIE
datetime.isoformat()
- handled in _extract_chapters()
_unfuck_day()
timezone handled in:
_timestring_to_datetime
with datetime.timezone_get_programme_meta
with +0900
in unified_timestamp
- url format:
20230607062200
- YYYYMMMDDhhmmss - 29-hour time is valid - handled inShareIE
bit more complicated than that
on the site, seconds and minutes get clamped to 59, hours get clamped to 24 but share urls do indeed just go on forever
just to comment a bit on the current solution:
it's definitely not perfect, there's still some jank etc etc but its a hell of a lot better than what i had before lol
i think ideally i'd've liked to extend upon datetime.datetime, so id still get all the nice functions it has that i have to do some jank to get to but i couldn't figure out how and i just wanted to get on with it, so i have the current solution of doing passthrough for the couple of things i need that are in datetime.datetime again, not perfect, but much better than what came before
hm, here's a hack for handling the days in the share time take away any days above 28 (lowest month end), then add them back in the datetime
not sure if it'll work yet, just noting down so i don't forget
days above the end of the month dont work on the site wasnt able to check before because it wasnt quite the end of the month yet
some of it's a bit fragmented and hacky at the moment, might be a good idea to make a big unified one that uses datetime and can handle all the formats needed
todo:specific examples (ctrl-f for "hack")