Giter VIP home page Giter VIP logo

kishanmodi / torrent-scrapper-api Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 14 KB

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.

Home Page: https://tscrap.herokuapp.com/

License: MIT License

Python 100.00%
bs4 flask heroku python-scraper python3 scrapping 1337x-api magnet-link torrent torrent-scraper

torrent-scrapper-api's Introduction

Torrent Scrapper API

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.

Demo

API

https://tscrap.herokuapp.com/

Web App

https://magnet-s.vercel.app/

Telegram Bot

Magnet Scrapper BOT

API Reference

Get sites available

GET /sites

"No Parameters"

Search a site for torrents

GET /torrents

Parameters:
  {
    "key" : "key",
    "safe" : true
  }

Get magnet link and file list

GET /torrents

Parameters:
  {"link" : "link"}

API Examples and Demos

Try this examples in your system

Getting List of sites

https://tscrap.herokuapp.com/sites

Returns JSON

[
  {
    "id": 1,
    "name": "1337x"
  }
]

Searching 1337x for Linux torrents

https://tscrap.herokuapp.com/torrents?key=ubuntu

Returns JSON

[
  {
    "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"
  },
  ...
]

Geting magnet link and file list

https://tscrap.herokuapp.com/magnet?link=https://www.1377x.to//torrent/2099267/Ubuntu-MATE-16-04-2-MATE-armhf-img-xz-Uzerus

Returns JSON

{
  "magnet": "magnet:?xt=urn:btih:D0F23C109D8662A3FE93.....Fannounce",
  "files": [
    "ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz (1.1 GB)"
  ]
}

Run Locally

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

Deployment

Deploy

To deploy this project on heroku run

Login to Heroku

heroku login

create a new app on Heroku

git init
heroku git:remote -a your-app-name

commit your changes

git add .
git commit -m'initial changes'
git push heroku main

Access your app on

  https://your-app-name.herokuapp.com

Acknowledgements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.