Created
August 18, 2020 14:23
-
-
Save salman0ansari/227e4f3a148a41d76982af0b8f63fb41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, jsonify | |
import requests | |
import piratebay | |
app = Flask(__name__) | |
app.url_map.strict_slashes = False | |
@app.route("/") | |
def home(): | |
return 'Torrent Api id Up!!' | |
@app.route("/<query>") | |
def pirateget_(query): | |
return jsonify(piratebay.pirate(query)) | |
if __name__ == "__main__": | |
app.debug = True | |
app.run(host='0.0.0.0',port= 5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment