Creating Command Line Torrent Searcher
Its been difficult to search torrents in the web these days. So, I planned to create a torrent searching script using python. First of all, we need asource to scrap the torrents.
I use the following torrent websites:
Review
The Pirate Bay proxies are banned pretty quickly. So, its waste to use them.
Snowfl is great since that website itself scraps torrents from tpb and 1337x etc… But there is no way to provide search arguments in the url.
( Like https://google.com/?q=search+term
)
Next option is skytorrents. Darn, It even got rss to search. I planned to use it.
Creation
The base url for rss search is https://skytorrents.to/rss?search=search+term
I tried to parse it using feedparser library in python.
F**k, the seeders and leechers in the rss feed are in the torznab attribute
which are not parsed by feedparser library.
Sh*t, now I am back to beautiful Soup library to parse the html. Wait for it….. When I tried to parse, I came to know that beautifulsoup also supports parsing the xml(rss). Nice. Now I wrote a script to parse them and display in the terminal. The search argument is parsed using argparse library.
The output is sh*ty, So, I used terminal tables library to get the clean output with the tables.
Output
The script is given below.
Any doubts? Contact me. ( Social Links are in the home page ) Homepage