bogenpirat / remote-torrent-adder

A handy Chrome extension to add torrent files to torrent clients
235 stars 81 forks source link

Grab Link from New Tab not working #319

Closed joncevski closed 2 years ago

joncevski commented 2 years ago

First off, thank you for your hard work.

I have trouble catching torrents from new tabs.

The link address is this: https://zamunda.net/download_go.php?id=677404

When I open the page, the page will load and after some time the torrent file is downloaded: https://zamunda.net/download.php/677404/The.Last.Duel.(2021).1080p.WEBRip.DDP-5.1.H265.torrent

I can see that there is a GET request for that file in Chrome Dev Tools

Tried this regex which should work: zamunda.net\/download.php\/\d+\/.+?.torrent

My question is does the regex work on new tabs or maybe I have the wrong regex?

Thanks

bogenpirat commented 2 years ago

that page is rejecting my requests, so i can't look for myself. but:

When I open the page, the page will load and after some time the torrent file is downloaded:

this sorta sounds like the page that loads is not actually the .torrent file itself, but some html/javascript code that then somehow loads the .torrent file. can you check whether this is the case?

joncevski commented 2 years ago

Yes, that is correct. A script makes a GET request and the file is downloaded. Can rta catch this downloads? Thanks

bogenpirat commented 2 years ago

i mean in theory the chrome API exists, but this would intercept traffic that i wouldn't want it to intercept, so the answer is no. sorry. closing this.

PS: perhaps you can write a userscript that rewrites links on your site to refer to the links that the script calls and create a regex for RTA and circumvent the whole downloading part that way.