StreamingCommunity 3.0.1__py3-none-any.whl → 3.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of StreamingCommunity might be problematic. Click here for more details.
- StreamingCommunity/Api/Player/hdplayer.py +65 -0
- StreamingCommunity/Api/Player/mixdrop.py +145 -0
- StreamingCommunity/Api/Site/1337xx/site.py +1 -1
- StreamingCommunity/Api/Site/altadefinizione/site.py +1 -1
- StreamingCommunity/Api/Site/animeunity/site.py +2 -1
- StreamingCommunity/Api/Site/animeworld/site.py +7 -3
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py +1 -1
- StreamingCommunity/Api/Site/guardaserie/site.py +1 -1
- StreamingCommunity/Api/Site/raiplay/site.py +2 -2
- StreamingCommunity/Api/Site/streamingcommunity/series.py +2 -2
- StreamingCommunity/Api/Site/streamingcommunity/site.py +1 -1
- StreamingCommunity/Api/Site/streamingwatch/__init__.py +95 -0
- StreamingCommunity/Api/Site/streamingwatch/film.py +61 -0
- StreamingCommunity/Api/Site/streamingwatch/series.py +160 -0
- StreamingCommunity/Api/Site/streamingwatch/site.py +111 -0
- StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py +118 -0
- StreamingCommunity/Lib/Proxies/proxy.py +232 -0
- StreamingCommunity/Upload/update.py +23 -22
- StreamingCommunity/Upload/version.py +1 -1
- StreamingCommunity/Util/os.py +38 -0
- StreamingCommunity/global_search.py +16 -4
- StreamingCommunity/run.py +11 -2
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/METADATA +17 -2
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/RECORD +28 -21
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/WHEEL +1 -1
- StreamingCommunity/Api/Player/maxstream.py +0 -140
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/entry_points.txt +0 -0
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/licenses/LICENSE +0 -0
- {streamingcommunity-3.0.1.dist-info → streamingcommunity-3.0.3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Home-page: https://github.com/Lovi-0/StreamingCommunity
|
|
5
5
|
Author: Lovi-0
|
|
6
6
|
Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
|
|
@@ -17,6 +17,7 @@ Requires-Dist: m3u8
|
|
|
17
17
|
Requires-Dist: certifi
|
|
18
18
|
Requires-Dist: psutil
|
|
19
19
|
Requires-Dist: unidecode
|
|
20
|
+
Requires-Dist: dnspython
|
|
20
21
|
Requires-Dist: jsbeautifier
|
|
21
22
|
Requires-Dist: pathvalidate
|
|
22
23
|
Requires-Dist: pycryptodomex
|
|
@@ -832,11 +833,25 @@ Contributions are welcome! Steps:
|
|
|
832
833
|
4. Push to branch (`git push origin feature/AmazingFeature`)
|
|
833
834
|
5. Open Pull Request
|
|
834
835
|
|
|
835
|
-
|
|
836
836
|
# Disclaimer
|
|
837
837
|
|
|
838
838
|
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
|
|
839
839
|
|
|
840
|
+
## Useful Project
|
|
841
|
+
|
|
842
|
+
### 🎯 [Unit3Dup](https://github.com/31December99/Unit3Dup)
|
|
843
|
+
Bot in Python per la generazione e l'upload automatico di torrent su tracker basati su Unit3D.
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
### 🇮🇹 [MammaMia](https://github.com/UrloMythus/MammaMia)
|
|
847
|
+
Addon per Stremio che consente lo streaming HTTPS di film, serie, anime e TV in diretta in lingua italiana.
|
|
848
|
+
|
|
849
|
+
### 🧩 [streamingcommunity-unofficialapi](https://github.com/Blu-Tiger/streamingcommunity-unofficialapi)
|
|
850
|
+
API non ufficiale per accedere ai contenuti del sito italiano StreamingCommunity.
|
|
851
|
+
|
|
852
|
+
### 🎥 [stream-buddy](https://github.com/Bbalduzz/stream-buddy)
|
|
853
|
+
Tool per guardare o scaricare film dalla piattaforma StreamingCommunity.
|
|
854
|
+
|
|
840
855
|
## Contributors
|
|
841
856
|
|
|
842
857
|
<a href="https://github.com/Arrowar/StreamingCommunity/graphs/contributors" alt="View Contributors">
|
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
StreamingCommunity/__init__.py,sha256=Cw-N0VCg7sef1WqdtvVwrhs1zc4LoUhs5C8k7vpM1lQ,207
|
|
2
|
-
StreamingCommunity/global_search.py,sha256=
|
|
3
|
-
StreamingCommunity/run.py,sha256=
|
|
2
|
+
StreamingCommunity/global_search.py,sha256=XPeNz1NEPZJNZAS2kba7yBYHPf32mFuWAX0eED__sMc,12341
|
|
3
|
+
StreamingCommunity/run.py,sha256=liXsTzowM_iXLbc_K5b_7mlKoJGF0_m6tRIEOqVw9BI,13689
|
|
4
4
|
StreamingCommunity/Api/Player/ddl.py,sha256=S3UZFonJl3d3xU1fQrosRFXFhwAm8hGVQ8Ff8g-6xSI,2071
|
|
5
|
-
StreamingCommunity/Api/Player/
|
|
5
|
+
StreamingCommunity/Api/Player/hdplayer.py,sha256=zfPcmtt8f-NfH9yapwwWpVSts-7s47vJ4_XHKJFg0i8,1875
|
|
6
6
|
StreamingCommunity/Api/Player/mediapolisvod.py,sha256=OcdnE1BMSwPZM-nw74GXNJ44E9RYwGnc_kFEA-G8XyY,2294
|
|
7
|
+
StreamingCommunity/Api/Player/mixdrop.py,sha256=B5KEv-S0xg8b8X2doSxPVcjgwDIlB5TP3m35zfn3v5w,4968
|
|
7
8
|
StreamingCommunity/Api/Player/supervideo.py,sha256=hr9QViI-XD0Dqhcx90oaH8_j0d6cxpVaf-EuCjMs6hI,5199
|
|
8
9
|
StreamingCommunity/Api/Player/sweetpixel.py,sha256=gJSe1fop5J216CB3u8vstxLPP5YbcyoGUH4y3X3-JaQ,1643
|
|
9
10
|
StreamingCommunity/Api/Player/vixcloud.py,sha256=qI9ppYEMGaJ1B5y693BOMeRQri-F4-94SfRkS-9udfM,6287
|
|
10
11
|
StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py,sha256=U-8QlD5kGzIk3-4t4D6QyYmiDe8UBrSuVi1YHRQb7AU,4295
|
|
11
12
|
StreamingCommunity/Api/Player/Helper/Vixcloud/util.py,sha256=QLUgbwQrpuPIVNzdBlAiEJXnd-eCj_JQFckZZEEL55w,5214
|
|
12
13
|
StreamingCommunity/Api/Site/1337xx/__init__.py,sha256=OdQxYoJ9UyGSAutZwqH1FgmOH-Z6vGVHb0CLKhwEZGM,1999
|
|
13
|
-
StreamingCommunity/Api/Site/1337xx/site.py,sha256=
|
|
14
|
+
StreamingCommunity/Api/Site/1337xx/site.py,sha256=5XVUMTQn1UqMYgo7tPAw7bGMA-tqhQnfeOGKkgGh9OA,2349
|
|
14
15
|
StreamingCommunity/Api/Site/1337xx/title.py,sha256=8T3cVRb-Mt9QdOtKWVVFHz8iOHqspf7iw28E7bfTV78,1865
|
|
15
16
|
StreamingCommunity/Api/Site/altadefinizione/__init__.py,sha256=Oxjfyg6VolwV6n2VGgICLvdRVPPMzJXMSdz8oI2Xs0M,4145
|
|
16
17
|
StreamingCommunity/Api/Site/altadefinizione/film.py,sha256=0XeqMrMHnk5nbFkVTFaNZWtlXI8pETl7dsORDtIMbjg,4395
|
|
17
18
|
StreamingCommunity/Api/Site/altadefinizione/series.py,sha256=-rCYx-Fa7aZiYepcIne7OdH1aaUFZZAPX-ToBv6mxFs,8192
|
|
18
|
-
StreamingCommunity/Api/Site/altadefinizione/site.py,sha256=
|
|
19
|
+
StreamingCommunity/Api/Site/altadefinizione/site.py,sha256=2kUNQ8ebYlX5dkSql-CvEhU01TOTNtuyEMIAD6SC3lg,2865
|
|
19
20
|
StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py,sha256=bSApjfY9xd5dw0tZ1t7vB6ifAo5vAkeeEwX6IS7yH1o,3756
|
|
20
21
|
StreamingCommunity/Api/Site/animeunity/__init__.py,sha256=EayZqxyWltgjRRDNfM32JRzgeyElK85o6s0_YJ0dpBk,4031
|
|
21
22
|
StreamingCommunity/Api/Site/animeunity/film.py,sha256=Vqg6yag2siR-Y3ougBsV8mzdQXChxg6ghz_KVXFQ3pE,998
|
|
22
23
|
StreamingCommunity/Api/Site/animeunity/serie.py,sha256=ib86sLXYsYbrvrFNbzKdhlwMUO3DT7JS5yTTrrSr2jk,5711
|
|
23
|
-
StreamingCommunity/Api/Site/animeunity/site.py,sha256=
|
|
24
|
+
StreamingCommunity/Api/Site/animeunity/site.py,sha256=iRFMUdtHricrc09gmVS1kUOQ-EqH_8zafh8ag4HHiUA,5672
|
|
24
25
|
StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py,sha256=Ze6a8D2MRhiOvSw3mTpL3ue2iVc6pA5aqoyUMCTnT7A,3809
|
|
25
26
|
StreamingCommunity/Api/Site/animeworld/__init__.py,sha256=UzHQbfxx_i6qzM586LL940CoiI3Y98IGIVP4-hXUxn4,2790
|
|
26
27
|
StreamingCommunity/Api/Site/animeworld/film.py,sha256=W9KOS9Wvx3Mlqx5WojR-NgnF9WX8mI79JZPS7UwG-dc,1763
|
|
27
28
|
StreamingCommunity/Api/Site/animeworld/serie.py,sha256=MXyV1fK05jPW4iV9NWrRKW-R4ect-TSN78-2APayniU,3516
|
|
28
|
-
StreamingCommunity/Api/Site/animeworld/site.py,sha256=
|
|
29
|
+
StreamingCommunity/Api/Site/animeworld/site.py,sha256=HBUAYiOa-UPGAO4lyTL1qIqqpDNVhWRHZ-nyLFltl7I,3702
|
|
29
30
|
StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py,sha256=CBTCH_wnTXUK_MKwq9a1k_XdvOlUrMpbUmpkD5fXVQ0,3589
|
|
30
31
|
StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py,sha256=2FGeGNJ5SHPQzKEEmVMFWft4woGgJ-XLeNxjbSb6L9s,2141
|
|
31
32
|
StreamingCommunity/Api/Site/ddlstreamitaly/series.py,sha256=F_D_2lwHHWN5hgLs8oUDNCYe-4SEPtWzJoU4yT_Nzfg,3726
|
|
32
|
-
StreamingCommunity/Api/Site/ddlstreamitaly/site.py,sha256=
|
|
33
|
+
StreamingCommunity/Api/Site/ddlstreamitaly/site.py,sha256=Rh0icHsYc9RIEkaRQspeKyaFSunADntIcAwvRcnqHjw,2601
|
|
33
34
|
StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py,sha256=tETaN-2GyFBeRsoLnGw3Kz4D4j2TMcnPzGjzlC62w_Y,3655
|
|
34
35
|
StreamingCommunity/Api/Site/guardaserie/__init__.py,sha256=p5hzqshw5hwDl9nJ8FBWbzfPe2j7c5eNYiaftDThGcU,2768
|
|
35
36
|
StreamingCommunity/Api/Site/guardaserie/series.py,sha256=U9rMZCjRqHLFjo468vikxl-2RqO6DCJjebB-G8Y6LDg,6492
|
|
36
|
-
StreamingCommunity/Api/Site/guardaserie/site.py,sha256=
|
|
37
|
+
StreamingCommunity/Api/Site/guardaserie/site.py,sha256=6PPp6qykuKZ3Sa2uY7E1xTwh1-8vHINsEpokGnathmw,2326
|
|
37
38
|
StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py,sha256=_aXU-YcUtSwbC2b6QpNnWDZR8m6vp9xzBEx_zdu5tgI,4196
|
|
38
39
|
StreamingCommunity/Api/Site/raiplay/__init__.py,sha256=xkxVkFsSxA6DHRqPuzQYXnCVNUBhfUG5xxlz6iwf1mw,3132
|
|
39
40
|
StreamingCommunity/Api/Site/raiplay/film.py,sha256=wBv5kQXx7-aCKhAZ5LABZ8zUzu_jPGdXOl9OM2p8dpY,1982
|
|
40
41
|
StreamingCommunity/Api/Site/raiplay/series.py,sha256=uQVbeA_g3Z1Ciqeq99gsY2F8mC5DssH3ueGbCW8gd9Q,6161
|
|
41
|
-
StreamingCommunity/Api/Site/raiplay/site.py,sha256=
|
|
42
|
+
StreamingCommunity/Api/Site/raiplay/site.py,sha256=0s1yHhEIA-JJVb2uVe_SZKILx7TIisadZmov7ZhG28s,5160
|
|
42
43
|
StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py,sha256=5F6abToCTtsvW8iIACbChZ0fPlymJiCSF_y8FRsDu7M,5002
|
|
43
44
|
StreamingCommunity/Api/Site/streamingcommunity/__init__.py,sha256=Ej-xZ6x99zeq3p5O7-e_Evi_529x3eq_VryBLejCBiA,3796
|
|
44
45
|
StreamingCommunity/Api/Site/streamingcommunity/film.py,sha256=TPt0yB1DKShDIz_1OEVG1IolMoAKBOaWIZ8lQF61dfM,2575
|
|
45
|
-
StreamingCommunity/Api/Site/streamingcommunity/series.py,sha256=
|
|
46
|
-
StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=
|
|
46
|
+
StreamingCommunity/Api/Site/streamingcommunity/series.py,sha256=zDvmxGHvljpyX82CSE88Zf7EIYtuXAxLDkk0qUTBRdA,8860
|
|
47
|
+
StreamingCommunity/Api/Site/streamingcommunity/site.py,sha256=GlkxDJH5QezpLoPKRZhLE3ovX4G4ZbsBf5yVG7zbQYw,3134
|
|
47
48
|
StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py,sha256=3sNz9uD-o9xz0dKpSnQsLPC_45v5fnW9Mzas2rQ8-Uc,5579
|
|
49
|
+
StreamingCommunity/Api/Site/streamingwatch/__init__.py,sha256=Y6YsO6m52mKCj0AUXRmBY__zpNmSklWl32U0c7o5yIQ,3544
|
|
50
|
+
StreamingCommunity/Api/Site/streamingwatch/film.py,sha256=QWE4e7Z9c0oTidP76cZPWdOKFU77_RbMXOHOlLRtPFk,1664
|
|
51
|
+
StreamingCommunity/Api/Site/streamingwatch/series.py,sha256=HF4SykhaOathLeCbYrRd1-BdCg30pDRQRCI43FnM2ck,6233
|
|
52
|
+
StreamingCommunity/Api/Site/streamingwatch/site.py,sha256=tFPQTjT9AwZuAh3Z-cn110Xb1snEh4CCNv8Zuc1Vch8,3250
|
|
53
|
+
StreamingCommunity/Api/Site/streamingwatch/util/ScrapeSerie.py,sha256=tEiwL7R5wI8F9ZLOiI-E7pEh72UJaNtswCjhx_wRlBY,4300
|
|
48
54
|
StreamingCommunity/Api/Template/__init__.py,sha256=oyfd_4_g5p5q6mxb_rKwSsudZnTM3W3kg1tLwxg-v-Q,46
|
|
49
55
|
StreamingCommunity/Api/Template/config_loader.py,sha256=2RT_0mqQmWzXM4rYaqss-yhXztYAcfNkTalFPjzv270,2056
|
|
50
56
|
StreamingCommunity/Api/Template/site.py,sha256=BJjQktdu2q2pkGflJv3UdrpSEmzJCJnaT-u-jD5zhgs,2861
|
|
@@ -65,24 +71,25 @@ StreamingCommunity/Lib/M3U8/decryptor.py,sha256=kuxxsd3eN0VGRrMJWXzHo8gCpT0u3fSZ
|
|
|
65
71
|
StreamingCommunity/Lib/M3U8/estimator.py,sha256=8gwTxJ3poRqZdHUTD9_oqXegiPWSXFuqLmqCZBnXS8A,5893
|
|
66
72
|
StreamingCommunity/Lib/M3U8/parser.py,sha256=cSjXPOSgTewrfLgREyQ47wzoOeoYo3L4lOfEWZKxad8,22485
|
|
67
73
|
StreamingCommunity/Lib/M3U8/url_fixer.py,sha256=zldE4yOuNBV6AAvL1KI6p7XdRI_R5YZRscbDgT1564M,1735
|
|
74
|
+
StreamingCommunity/Lib/Proxies/proxy.py,sha256=oHWT0a4kO3k8AyUVO_c0LfPmLcO5A8sGLhgJjBBwEnk,9350
|
|
68
75
|
StreamingCommunity/Lib/TMBD/__init__.py,sha256=XzE42tw3Ws59DD1PF8WmGtZ0D4D7Hk3Af8QthNE-22U,66
|
|
69
76
|
StreamingCommunity/Lib/TMBD/obj_tmbd.py,sha256=dRSvJFS5yqmsBZcw2wqbStcBtXNjU_3n5czMyremAtU,1187
|
|
70
77
|
StreamingCommunity/Lib/TMBD/tmdb.py,sha256=byg0EFnlmd9JeLvn1N9K3QkB1KEfeMuFa7OVfGqks1Y,10685
|
|
71
78
|
StreamingCommunity/TelegramHelp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
79
|
StreamingCommunity/TelegramHelp/telegram_bot.py,sha256=Qe1__aoK4PpDuing8JtWgdHzLee8LuYYyfeLNA7yADU,26307
|
|
73
|
-
StreamingCommunity/Upload/update.py,sha256=
|
|
74
|
-
StreamingCommunity/Upload/version.py,sha256=
|
|
80
|
+
StreamingCommunity/Upload/update.py,sha256=Tp7PdU49rk1bga76_DiaghrbE7Fb3p4iq5S4CqZZy2A,3462
|
|
81
|
+
StreamingCommunity/Upload/version.py,sha256=z1iCq1CT_TWzkf7QuFabw0M8xvUi2WI5YiI19caaPz8,171
|
|
75
82
|
StreamingCommunity/Util/color.py,sha256=NvD0Eni-25oOOkY-szCEoc0lGvzQxyL7xhM0RE4EvUM,458
|
|
76
83
|
StreamingCommunity/Util/config_json.py,sha256=r31BJP67EItcI6GioEX7FJzmzM0mubmZ7M73mvZ9YWo,24801
|
|
77
84
|
StreamingCommunity/Util/ffmpeg_installer.py,sha256=yRVIPwbh05tZ-duZmXkH0qasLNxaQCAT_E4cTP79Z3c,14890
|
|
78
85
|
StreamingCommunity/Util/headers.py,sha256=TItkaFMx1GqsVNEIS3Tr0BGU5EHyF-HkZVliHORT3P8,308
|
|
79
86
|
StreamingCommunity/Util/logger.py,sha256=9kGD6GmWj2pM8ADpJc85o7jm8DD0c5Aguqnq-9kmxos,3314
|
|
80
87
|
StreamingCommunity/Util/message.py,sha256=SJaIPLvWeQqsIODVUKw3TgYRmBChovmlbcF6OUxqMI8,1425
|
|
81
|
-
StreamingCommunity/Util/os.py,sha256=
|
|
88
|
+
StreamingCommunity/Util/os.py,sha256=Q1t8K7jUR27RGEZghfN1Xmvw8BGzK0npF1cFUf1OloQ,16381
|
|
82
89
|
StreamingCommunity/Util/table.py,sha256=Nw5PlsvfEIOQZWy5VhsU5OK3heuBXGwsqmLl0k8yQzc,9813
|
|
83
|
-
streamingcommunity-3.0.
|
|
84
|
-
streamingcommunity-3.0.
|
|
85
|
-
streamingcommunity-3.0.
|
|
86
|
-
streamingcommunity-3.0.
|
|
87
|
-
streamingcommunity-3.0.
|
|
88
|
-
streamingcommunity-3.0.
|
|
90
|
+
streamingcommunity-3.0.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
91
|
+
streamingcommunity-3.0.3.dist-info/METADATA,sha256=NVmIOnPKk1UDYsngEnAuP5BhBOoQLvBkfxadAZdscgE,25717
|
|
92
|
+
streamingcommunity-3.0.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
93
|
+
streamingcommunity-3.0.3.dist-info/entry_points.txt,sha256=Qph9XYfDC8n4LfDLOSl6gJGlkb9eFb5f-JOr_Wb_5rk,67
|
|
94
|
+
streamingcommunity-3.0.3.dist-info/top_level.txt,sha256=YsOcxKP-WOhWpIWgBlh0coll9XUx7aqmRPT7kmt3fH0,19
|
|
95
|
+
streamingcommunity-3.0.3.dist-info/RECORD,,
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# 05.07.24
|
|
2
|
-
|
|
3
|
-
import re
|
|
4
|
-
import logging
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# External libraries
|
|
8
|
-
import httpx
|
|
9
|
-
import jsbeautifier
|
|
10
|
-
from bs4 import BeautifulSoup
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Internal utilities
|
|
14
|
-
from StreamingCommunity.Util.config_json import config_manager
|
|
15
|
-
from StreamingCommunity.Util.headers import get_userAgent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# Variable
|
|
19
|
-
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class VideoSource:
|
|
23
|
-
def __init__(self, url: str):
|
|
24
|
-
"""
|
|
25
|
-
Sets up the video source with the provided URL.
|
|
26
|
-
|
|
27
|
-
Parameters:
|
|
28
|
-
- url (str): The URL of the video.
|
|
29
|
-
"""
|
|
30
|
-
self.url = url
|
|
31
|
-
self.redirect_url = None
|
|
32
|
-
self.maxstream_url = None
|
|
33
|
-
self.m3u8_url = None
|
|
34
|
-
self.headers = {'user-agent': get_userAgent()}
|
|
35
|
-
|
|
36
|
-
def get_redirect_url(self):
|
|
37
|
-
"""
|
|
38
|
-
Sends a request to the initial URL and extracts the redirect URL.
|
|
39
|
-
"""
|
|
40
|
-
try:
|
|
41
|
-
response = httpx.get(self.url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
|
42
|
-
response.raise_for_status()
|
|
43
|
-
|
|
44
|
-
# Extract the redirect URL from the HTML
|
|
45
|
-
soup = BeautifulSoup(response.text, "html.parser")
|
|
46
|
-
self.redirect_url = soup.find("div", id="iframen1").get("data-src")
|
|
47
|
-
logging.info(f"Redirect URL: {self.redirect_url}")
|
|
48
|
-
|
|
49
|
-
return self.redirect_url
|
|
50
|
-
|
|
51
|
-
except Exception as e:
|
|
52
|
-
logging.error(f"Error parsing HTML: {e}")
|
|
53
|
-
raise
|
|
54
|
-
|
|
55
|
-
def get_maxstream_url(self):
|
|
56
|
-
"""
|
|
57
|
-
Sends a request to the redirect URL and extracts the Maxstream URL.
|
|
58
|
-
"""
|
|
59
|
-
try:
|
|
60
|
-
response = httpx.get(self.redirect_url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
|
61
|
-
response.raise_for_status()
|
|
62
|
-
|
|
63
|
-
# Extract the Maxstream URL from the HTML
|
|
64
|
-
soup = BeautifulSoup(response.text, "html.parser")
|
|
65
|
-
maxstream_url = soup.find("a")
|
|
66
|
-
|
|
67
|
-
if maxstream_url is None:
|
|
68
|
-
|
|
69
|
-
# If no anchor tag is found, try the alternative method
|
|
70
|
-
logging.warning("Anchor tag not found. Trying the alternative method.")
|
|
71
|
-
headers = {
|
|
72
|
-
'origin': 'https://stayonline.pro',
|
|
73
|
-
'user-agent': get_userAgent(),
|
|
74
|
-
'x-requested-with': 'XMLHttpRequest',
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
# Make request to stayonline api
|
|
78
|
-
data = {'id': self.redirect_url.split("/")[-2], 'ref': ''}
|
|
79
|
-
response = httpx.post('https://stayonline.pro/ajax/linkEmbedView.php', headers=headers, data=data)
|
|
80
|
-
response.raise_for_status()
|
|
81
|
-
uprot_url = response.json()['data']['value']
|
|
82
|
-
|
|
83
|
-
# Retry getting maxtstream url
|
|
84
|
-
response = httpx.get(uprot_url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
|
85
|
-
response.raise_for_status()
|
|
86
|
-
soup = BeautifulSoup(response.text, "html.parser")
|
|
87
|
-
maxstream_url = soup.find("a").get("href")
|
|
88
|
-
|
|
89
|
-
else:
|
|
90
|
-
maxstream_url = maxstream_url.get("href")
|
|
91
|
-
|
|
92
|
-
self.maxstream_url = maxstream_url
|
|
93
|
-
logging.info(f"Maxstream URL: {self.maxstream_url}")
|
|
94
|
-
|
|
95
|
-
return self.maxstream_url
|
|
96
|
-
|
|
97
|
-
except Exception as e:
|
|
98
|
-
logging.error(f"Error during the request: {e}")
|
|
99
|
-
raise
|
|
100
|
-
|
|
101
|
-
def get_m3u8_url(self):
|
|
102
|
-
"""
|
|
103
|
-
Sends a request to the Maxstream URL and extracts the .m3u8 file URL.
|
|
104
|
-
"""
|
|
105
|
-
try:
|
|
106
|
-
response = httpx.get(self.maxstream_url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
|
107
|
-
response.raise_for_status()
|
|
108
|
-
soup = BeautifulSoup(response.text, "html.parser")
|
|
109
|
-
|
|
110
|
-
# Iterate over all script tags in the HTML
|
|
111
|
-
for script in soup.find_all("script"):
|
|
112
|
-
if "eval(function(p,a,c,k,e,d)" in script.text:
|
|
113
|
-
|
|
114
|
-
# Execute the script using
|
|
115
|
-
data_js = jsbeautifier.beautify(script.text)
|
|
116
|
-
|
|
117
|
-
# Extract the .m3u8 URL from the script's output
|
|
118
|
-
match = re.search(r'sources:\s*\[\{\s*src:\s*"([^"]+)"', data_js)
|
|
119
|
-
|
|
120
|
-
if match:
|
|
121
|
-
self.m3u8_url = match.group(1)
|
|
122
|
-
logging.info(f"M3U8 URL: {self.m3u8_url}")
|
|
123
|
-
break
|
|
124
|
-
|
|
125
|
-
else:
|
|
126
|
-
logging.error("Failed to find M3U8 URL: No match found")
|
|
127
|
-
|
|
128
|
-
return self.m3u8_url
|
|
129
|
-
|
|
130
|
-
except Exception as e:
|
|
131
|
-
logging.error(f"Error executing the Node.js script: {e}")
|
|
132
|
-
raise
|
|
133
|
-
|
|
134
|
-
def get_playlist(self):
|
|
135
|
-
"""
|
|
136
|
-
Executes the entire flow to obtain the final .m3u8 file URL.
|
|
137
|
-
"""
|
|
138
|
-
self.get_redirect_url()
|
|
139
|
-
self.get_maxstream_url()
|
|
140
|
-
return self.get_m3u8_url()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|