Skip to content

Instantly share code, notes, and snippets.

@MrDini123
Created January 11, 2024 16:19
Show Gist options
  • Save MrDini123/212a2c93e611c9f92b5bbdecd314590f to your computer and use it in GitHub Desktop.
Save MrDini123/212a2c93e611c9f92b5bbdecd314590f to your computer and use it in GitHub Desktop.
from flask import Flask, redirect, request
app = Flask(__name__)
@app.route('/test.m3u8')
def test():
user_agent = request.headers.get('User-Agent')
print(user_agent)
return redirect('https://live-par-2-cdn-alt.livepush.io/live/bigbuckbunnyclip/index.m3u8')
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8082, debug=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment