Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PirateBay Bridge and magnet #412

Closed
niawag opened this issue Sep 29, 2016 · 4 comments
Closed

PirateBay Bridge and magnet #412

niawag opened this issue Sep 29, 2016 · 4 comments
Labels
Code-Inclusion-Request Author requests including code Code-Refactoring Code refactoring

Comments

@niawag
Copy link
Contributor

niawag commented Sep 29, 2016

Hi, I just discovered RSS-Bridge and I'm already loving this project!
I am testing the PirateBay Bridge resulting feed in a torrent client and the provided link is not working, I checked the XML and it seems that the URL is the pirate bay page, not a magnet link.

I have started to work on the Bridge to add this link and I'll be glad to share my work if I'm successfull but, as I'm no php expert I'd like to know if someone already have a working solution.

EDIT : it was easier than I thought, I changed the URI and ID as follow:

$item['uri'] = $element->find('a',3)->href;                
$item['id'] = self::URI.$element->find('a.detLink',0)->href;
@pmaziere
Copy link
Contributor

As explained in the wiki, 'id' is not part of items definition: uri is used as id when an id is required

As for uri, it usually is used to point to a web content, which magnet links are not.
IMHO, it would be more appropriate to include them in the item content.

@niawag
Copy link
Contributor Author

niawag commented Sep 29, 2016

Yes you're right, as I was doing this for myself I didn't really look at the specs. I'll try with the content item but that would remove other information (seeders, leeachers...). And torrent site RSS are frequently using the link item to provide magnet as seen here: http://showrss.info/show/637.rss. In other feed it's a specific item named "torrent:magnetURI" that is used but I'm not sure I can add that in RSS Bridge?

I'd like to improve the Pirate Bay Bridge and add the following:

  • return RSS feed of an uploader
  • return RSS feed of a category
    (already done it for myself by cloning and changing the original TPB Bridge)
    And, if I manage to do it, I'd like to allow combinations:
  • search terms in a specific category
  • search terms for a specific uploader
  • return uploader feed for a specific category
    I'm not sure if this is possible/easy as I just started to play with RSS Bridge but if this is interesting for others than me I'll try and do it!

@mitsukarenai
Copy link
Member

Yes this is something I'm seeing often on torrent sites, where RSS/ATOM feeds use the download link or magnet link as item/entry url, and I guess that's how torrent software supports them (as the software only has to parse the item/entry url to detect changes and retrieve the torrent or magnet uri, with most other metadata pulled from the torrent file or the DHT (name, size, seeds, leeches, some proprietary protocols also include uploader, comments, ratings...)

So yes, I'm in favor for your suggestion of using magnet uris as item link, however you'll need to make the following change in your code so it can be included to RSS Bridge:

  • the "download" link inside the item content would be no longer needed, you can replace it by "info page" and linking it to the The Pirate Bay torrent info page

@mitsukarenai mitsukarenai added Code-Refactoring Code refactoring Code-Inclusion-Request Author requests including code labels Oct 2, 2016
@niawag
Copy link
Contributor Author

niawag commented Oct 2, 2016

Hi mitsukarenai and thanks a lot! I made the change you asked for (remove the magnet link from content and added the link to TPB torrent info page) and also added some possibilities, now we can get the feeds from:

  • normal search
  • normal search in a specific category
  • category
  • uploader

It seems to be impossible to perform search for a specific uploader, otherwise I'll add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code-Inclusion-Request Author requests including code Code-Refactoring Code refactoring
Projects
None yet
Development

No branches or pull requests

3 participants