Skip to content

refactor(torrents): use regex for magnet link extraction#5

Open
MaxSaketh wants to merge 1 commit into
iseshu:mainfrom
MaxSaketh:main
Open

refactor(torrents): use regex for magnet link extraction#5
MaxSaketh wants to merge 1 commit into
iseshu:mainfrom
MaxSaketh:main

Conversation

@MaxSaketh

Copy link
Copy Markdown

Overview

Switched the torrent link extraction strategy to target the URL structure directly instead of relying on a fragile CSS styling class.

Code Changes

Before After
soup.find_all("a", class_="mv_button_css") soup.find_all("a", href=re.compile(r'magnet:\?xt=urn:btih:[^\s"]+'))

Key Improvements

  • More Robust: The scraper no longer breaks if the website changes its design or CSS class names (mv_button_css).
  • Direct Targeting: It strictly extracts valid BitTorrent magnet links based on the URL protocol (magnet:?xt=urn:btih:).

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@MaxSaketh is attempting to deploy a commit to the Seshu Sai's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant