Created
August 24, 2014 19:39
-
-
Save kanzure/8d8c1582883104e8785c to your computer and use it in GitHub Desktop.
http server to fetch content through ezproxy servers
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, | |
request, | |
) | |
app = Flask(__name__) | |
@app.route("/plsget") | |
def plsget(): | |
data = request.get_json(force=True) | |
response = fetch_by_ezproxy(data["url"]) | |
return response.content | |
if __name__ == "__main__": | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment