Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
onTDB committed Oct 1, 2022
1 parent 8487675 commit dead5a0
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*


__pycache__/
*.py[cod]
*$py.class
_metadata/
22 changes: 22 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

from flask import *
from flask_compress import Compress
import os
from streamlink import streams
import requests

compress = Compress()
app = Flask(__name__)
app.secret_key = os.urandom(12)

@app.route('/<path:path>')
def static_file(path):
s = streams("https://www.twitch.tv/" + path.replace(".m3u8", ""))
if s:
return requests.get(s["best"].url_master).content
else:
return "Stream not found"

if __name__ == '__main__':
app.debug = True
app.run(host="0.0.0.0", threaded=True, port=8888)
Binary file added icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions m3u8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {"regexSubstitution": "https://api1080.ontdb.com/"}
},
"condition": {
"regexFilter": "^https://usher.ttvnw.net/api/channel/hls/",
"resourceType": [
"script"
]
}
}
]
27 changes: 27 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "T1080",
"description": "트위치 SEL(한국) 1080p API 지원",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"declarativeNetRequest"
],
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
"host_permissions": [
"*://usher.ttvnw.net/api/channel/hls/*",
"*://*.twitch.tv/*"
],
"declarative_net_request": {
"rule_resources": [
{
"id": "m3u8",
"enabled": true,
"path": "m3u8.json"
}
]
}
}

0 comments on commit dead5a0

Please sign in to comment.