Mythus commited on
Commit
090bd72
·
verified ·
1 Parent(s): 6cfa7c7

Delete run.py

Browse files
Files changed (1) hide show
  1. run.py +0 -82
run.py DELETED
@@ -1,82 +0,0 @@
1
- from flask import Flask, jsonify, abort
2
- from filmpertutti import filmpertutti
3
- from streamingcommunity import streaming_community
4
- from tantifilm import tantifilm
5
- import json
6
- import config
7
- import logging
8
- logging.basicConfig(level=logging.INFO, format='%(message)s')
9
- FILMPERTUTTI = config.FILMPERTUTTI
10
- STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
11
- MYSTERIUS = config.MYSTERIUS
12
- TUTTIFILM = config.TUTTIFILM
13
- HOST = config.HOST
14
- PORT = int(config.PORT)
15
- if MYSTERIUS == "1":
16
- from cool import cool
17
-
18
-
19
- app = Flask(__name__)
20
-
21
- MANIFEST = {
22
- "id": "org.stremio.mammamia",
23
- "version": "1.0.0",
24
- "catalogs": [],
25
- "resources": ["stream"],
26
- "types": ["movie", "series"],
27
- "name": "Mamma Mia",
28
- "description": "Addon providing HTTPS Stream for Italian Movies/Series",
29
- "logo":"https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
30
- }
31
-
32
- def respond_with(data):
33
- resp = jsonify(data)
34
- resp.headers['Access-Control-Allow-Origin'] = '*'
35
- resp.headers['Access-Control-Allow-Headers'] = '*'
36
- return resp
37
-
38
- @app.route('/manifest.json')
39
- def addon_manifest():
40
- return respond_with(MANIFEST)
41
-
42
- @app.route('/')
43
- def root():
44
- return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
45
-
46
-
47
-
48
- @app.route('/stream/<type>/<id>.json')
49
- def addon_stream(type, id):
50
- if type not in MANIFEST['types']:
51
- abort(404)
52
- streams = {'streams': []}
53
- if MYSTERIUS == "1":
54
- results = cool(id)
55
- logging.info(results)
56
- if results:
57
- for resolution, link in results.items():
58
- streams['streams'].append({'title': f'HF Mysterious {resolution}', 'url': link})
59
- if STREAMINGCOMMUNITY == "1":
60
- url_streaming_community = streaming_community(id)
61
- logging.info(url_streaming_community)
62
- if url_streaming_community is not None:
63
- streams['streams'].append({'title': 'HF StreamingCommunity 1080p', 'url': f'{url_streaming_community}?rendition=1080p'})
64
- streams['streams'].append({'title': 'HF StreamingCommunity 720p', 'url': f'{url_streaming_community}?rendition=720p'})
65
-
66
- # If FILMPERTUTTI == 1, scrape that site
67
- if FILMPERTUTTI == "1":
68
- url_filmpertutti = filmpertutti(id)
69
- if url_filmpertutti is not None:
70
- streams['streams'].append({'title': 'Filmpertutti', 'url': url_filmpertutti})
71
- if TUTTIFILM == "1":
72
- url_tuttifilm = tantifilm(id)
73
- streams['streams'].append({'title': 'HF Tantifilm', 'url': url_tuttifilm,'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}},'notWebReady': True}})
74
- # If no streams were added, abort with a 404 error
75
- if not streams['streams']:
76
- abort(404)
77
-
78
- return respond_with(streams)
79
-
80
-
81
- if __name__ == '__main__':
82
- app.run(host=HOST, port=PORT)