Update lostfilm.py - #424
Open
zalessky wants to merge 1 commit into
Open
Conversation
Поддержка зеркал + адаптация к новой разметке сайта
SaintMortum
added a commit
to SaintMortum/monitorrent
that referenced
this pull request
Aug 24, 2026
Squashed and hand-verified subset of werwolfby#424 (zalessky, "Поддержка зеркал + адаптация к новой разметке сайта"). The original PR rewrote the whole file (+264/-862): dropped DB migrations, inlined LostFilmTVTracker into the plugin, removed timeout/proxy kwargs and the Cloudflare cookie refresh flow. This keeps that architecture and carries over only the actual site-adaptation fixes: - _play_episode_re allowed cat only up to 3 digits and required a fixed single-quoted, unspaced onclick body; shows with cat >= 1000 failed to match and crashed with AttributeError on .group('episode'). Now accepts single/double quotes, extra whitespace and 4-digit cat. - _follow_show_re: same quoting relaxation for FollowSerial(...). - _parse_series: episodes used to be found via a fixed table.movie-parts-list > tr > td.zeta > div chain that no longer matches current markup; now matches any onclick=PlayEpisode node inside a season block. Also guards missing series-block/h2, skips the season-as-a-whole pseudo-episode (999) and duplicate episodes. - get_download_info: meta-refresh parsing picked the first <meta> tag (usually charset, no content attr -> KeyError) and assumed an absolute redirect URL. Mirrors return a relative path, which made the follow-up request fail with requests.exceptions.MissingSchema. Now finds the refresh meta specifically and resolves the URL with urljoin against the tracker domain. - _prepare_request: (topic.season, topic.episode) > latest_episode raised TypeError on Python 3 when topic.episode was None (season set without an episode) or when a season number was a tuple (fractional season). None is now treated as 0 and tuple season numbers are skipped instead of crashing. Not carried over from werwolfby#424: removal of DB migrations, tracker/plugin merge, requests.Session() replacing tracker_settings timeout/proxy kwargs, dropped Cloudflare cookie refresh, and behavior changes to login()/verify()/check_download() error handling.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Поддержка зеркал + адаптация к новой разметке сайта