Skip to content

fix lostfilm - #406

Open
SaintMortum wants to merge 4 commits into
werwolfby:developfrom
SaintMortum:develop
Open

fix lostfilm#406
SaintMortum wants to merge 4 commits into
werwolfby:developfrom
SaintMortum:develop

Conversation

@SaintMortum

Copy link
Copy Markdown

Для некоторых сериалов по ссылке не страница со списком торрентов, а "Контент недоступен на территории Российской Федерации" где вставлена следующая ссылка на страницу со списком торрентов.
2024-07-17-230007_899x120_scrot

@werwolfby

Copy link
Copy Markdown
Owner

Спасибо, гляну, не знал про такую проблему

@SaintMortum

Copy link
Copy Markdown
Author

Проблема странная. Выскочила на сервере в докере, а локально не в докере работало нормально. Хотя IP один и тот же через свой VPN.
InSearch -.txt

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.
@SaintMortum

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants