fix lostfilm - #406
Open
SaintMortum wants to merge 4 commits into
Open
Conversation
Owner
|
Спасибо, гляну, не знал про такую проблему |
Author
|
Проблема странная. Выскочила на сервере в докере, а локально не в докере работало нормально. Хотя IP один и тот же через свой VPN. |
This reverts commit fd1809a.
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.
Author
|
@werwolfby выжал полезное из #424 при помощи клода. И так работало, но стало чуть понятнее. |
snosov
added a commit
to snosov/monitorrent
that referenced
this pull request
Aug 26, 2026
werwolfby#406 by Leliil: loosen the onclick regexes to accept quoted args and 4-digit cat ids, skip episode 999, resolve the download meta-refresh through urljoin so mirror domains work, and harden _parse_series/_prepare_request against missing nodes. Merges clean against our fixes: it only touches lostfilm.py, while our commits touch trackers/__init__.py, kinozal.py and nnmclub.py. Caveat on verification: the suite is unchanged at 63 failed / 1096 passed, but that is not evidence the PR works. All 31 lostfilm tests fail in setUp on pristine upstream/develop as well, because the test helper has no real credentials, so nothing here exercises this diff.
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.
Для некоторых сериалов по ссылке не страница со списком торрентов, а "Контент недоступен на территории Российской Федерации" где вставлена следующая ссылка на страницу со списком торрентов.
