An API to Scrap Magnet/Torrent Links from 1337x, It provides the top seeded result from your query. Scrapping is done using BeautifulSoup4 and Python3. API is hosted on Heroku.
GET /sites
"No Parameters"
GET /torrents
Parameters:
{
"key" : "key",
"safe" : true
}
GET /torrents
Parameters:
{"link" : "link"}
https://tscrap.herokuapp.com/sites
[
{
"id": 1,
"name": "1337x"
}
]
https://tscrap.herokuapp.com/torrents?key=ubuntu
[
{
"name": "Ubuntu MATE 16.04.2 [MATE][armhf][img.xz][Uzerus]",
"url": "https://www.1377x.to//torrent/2099267/Ubuntu-MATE-16-04-2-MATE-armhf-img-xz-Uzerus/",
"seeds": "260",
"leeches": "2",
"date": "Apr. 28th '17",
"size": "1.1 GB",
"uploader": "Uzerus\n"
},
{
"name": "Ubuntu Linux Unleashed 2021 Edition, 14th Edition",
"url": "https://www.1377x.to//torrent/4814893/Ubuntu-Linux-Unleashed-2021-Edition-14th-Edition/",
"seeds": "111",
"leeches": "9",
"date": "Mar. 23rd '21",
"size": "84.2 MB",
"uploader": "rootmk\n"
},
...
]
{
"magnet": "magnet:?xt=urn:btih:D0F23C109D8662A3FE93.....Fannounce",
"files": [
"ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz (1.1 GB)"
]
}
Clone the project
git clone https://github.com/kishanmodi/Torrent-Scrapper-API
Go to the project directory
cd Torrent-Scrapper-API
Install dependencies
pip3 install -r requirements.txt
Start the server (with given run script)
./run
(else) Start the server manually
FLASK_APP=app.py
FLASK_ENV=development
flask run
Access it using
http://server-ip:port/api
To deploy this project on heroku run
heroku login
git init
heroku git:remote -a your-app-name
git add .
git commit -m'initial changes'
git push heroku main
https://your-app-name.herokuapp.com