StreamingCommunity 2.6.1__tar.gz → 2.7.0__tar.gz

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.

Files changed (90) hide show
  1. {StreamingCommunity-2.6.1/StreamingCommunity.egg-info → StreamingCommunity-2.7.0}/PKG-INFO +39 -22
  2. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/README.md +38 -21
  3. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/ddl.py +2 -2
  4. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/maxstream.py +3 -3
  5. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/supervideo.py +2 -2
  6. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/vixcloud.py +16 -18
  7. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/1337xx/site.py +11 -4
  8. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/1337xx/title.py +3 -4
  9. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/animeunity/film_serie.py +5 -4
  10. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/animeunity/site.py +9 -3
  11. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +8 -9
  12. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/cb01new/site.py +12 -4
  13. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +10 -4
  14. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +2 -2
  15. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/guardaserie/site.py +17 -11
  16. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +4 -3
  17. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/mostraguarda/film.py +3 -3
  18. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/streamingcommunity/film.py +1 -1
  19. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/streamingcommunity/series.py +2 -2
  20. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/streamingcommunity/site.py +11 -4
  21. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +8 -9
  22. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/Util/get_domain.py +11 -72
  23. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/config_loader.py +6 -2
  24. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +2 -2
  25. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/HLS/proxyes.py +2 -2
  26. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/HLS/segments.py +5 -5
  27. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +2 -2
  28. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Upload/update.py +3 -3
  29. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Upload/version.py +1 -1
  30. StreamingCommunity-2.7.0/StreamingCommunity/Util/_jsonConfig.py +341 -0
  31. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/headers.py +8 -1
  32. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/run.py +13 -9
  33. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0/StreamingCommunity.egg-info}/PKG-INFO +39 -22
  34. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity.egg-info/SOURCES.txt +0 -4
  35. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity.egg-info/requires.txt +0 -1
  36. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/setup.py +1 -1
  37. StreamingCommunity-2.6.1/StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +0 -53
  38. StreamingCommunity-2.6.1/StreamingCommunity/Api/Site/ilcorsaronero/site.py +0 -64
  39. StreamingCommunity-2.6.1/StreamingCommunity/Api/Site/ilcorsaronero/title.py +0 -42
  40. StreamingCommunity-2.6.1/StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +0 -149
  41. StreamingCommunity-2.6.1/StreamingCommunity/Util/_jsonConfig.py +0 -241
  42. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/LICENSE +0 -0
  43. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/MANIFEST.in +0 -0
  44. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
  45. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
  46. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/1337xx/__init__.py +0 -0
  47. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/animeunity/__init__.py +0 -0
  48. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/cb01new/__init__.py +0 -0
  49. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/cb01new/film.py +0 -0
  50. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +0 -0
  51. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +0 -0
  52. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/guardaserie/__init__.py +0 -0
  53. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/guardaserie/series.py +0 -0
  54. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/mostraguarda/__init__.py +0 -0
  55. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +0 -0
  56. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
  57. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
  58. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
  59. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/Util/recall_search.py +0 -0
  60. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/__init__.py +0 -0
  61. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Api/Template/site.py +0 -0
  62. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -0
  63. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
  64. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
  65. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
  66. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
  67. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/FFmpeg/util.py +0 -0
  68. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
  69. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
  70. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/M3U8/estimator.py +0 -0
  71. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
  72. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
  73. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
  74. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
  75. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
  76. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
  77. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
  78. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/call_stack.py +0 -0
  79. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/color.py +0 -0
  80. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/console.py +0 -0
  81. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/ffmpeg_installer.py +0 -0
  82. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/logger.py +0 -0
  83. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/message.py +0 -0
  84. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/os.py +0 -0
  85. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/Util/table.py +0 -0
  86. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity/__init__.py +0 -0
  87. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
  88. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity.egg-info/entry_points.txt +0 -0
  89. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/StreamingCommunity.egg-info/top_level.txt +0 -0
  90. {StreamingCommunity-2.6.1 → StreamingCommunity-2.7.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: StreamingCommunity
3
- Version: 2.6.1
3
+ Version: 2.7.0
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
@@ -43,7 +43,7 @@ License-File: LICENSE
43
43
 
44
44
  # 📋 Table of Contents
45
45
 
46
- - 🌐 [Website available](#website-status)
46
+ - 🔄 [Update Domains](#update-domains)
47
47
  - 🛠️ [Installation](#installation)
48
48
  - 📦 [PyPI Installation](#1-pypi-installation)
49
49
  - 🔄 [Automatic Installation](#2-automatic-installation)
@@ -70,18 +70,15 @@ License-File: LICENSE
70
70
  # Installation
71
71
 
72
72
  <p align="center">
73
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
73
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe" style="margin: 0 20px;">
74
74
  <img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
75
75
  </a>
76
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
76
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac" style="margin: 0 20px;">
77
77
  <img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
78
78
  </a>
79
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
79
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux" style="margin: 0 20px;">
80
80
  <img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
81
81
  </a>
82
- <a href="https://github.com/Arrowar/StreamingCommunity/releases">
83
- <img src="https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge" alt="All Versions">
84
- </a>
85
82
  </p>
86
83
 
87
84
 
@@ -462,6 +459,40 @@ You can download VLC Media Player from the [official website](https://www.videol
462
459
  - `get_only_link`: Return M3U8 playlist/index URL instead of downloading
463
460
 
464
461
 
462
+ ## Update Domains
463
+
464
+ There are two ways to update the domains for the supported websites:
465
+
466
+ ### 1. Using Local Configuration
467
+
468
+ 1. Create a `domains.json` file in the root directory of the project
469
+
470
+ 2. Add your domain configuration in the following format:
471
+ ```json
472
+ {
473
+ "altadefinizione": {
474
+ "domain": "si",
475
+ "full_url": "https://altadefinizione.si/"
476
+ },
477
+ ...
478
+ }
479
+ ```
480
+
481
+ 3. Set `use_api` to `false` in the `DEFAULT` section of your `config.json`:
482
+ ```json
483
+ {
484
+ "DEFAULT": {
485
+ "use_api": false
486
+ }
487
+ }
488
+ ```
489
+
490
+ ### 2. Using API (Legacy)
491
+
492
+ The API-based domain updates are currently deprecated. To use it anyway, set `use_api` to `true` in your `config.json` file.
493
+
494
+ Note: If `use_api` is set to `false` and no `domains.json` file is found, the script will raise an error.
495
+
465
496
  # COMMAND
466
497
 
467
498
  - Download a specific season by entering its number.
@@ -571,20 +602,6 @@ Start the bot from the folder /StreamingCommunity/TelegramHelp
571
602
  python3 telegram_bot.py
572
603
  ```
573
604
 
574
- # Website Status
575
-
576
- | Website | Status | Command |
577
- |:-------------------|:------:|:--------:|
578
- | [1337xx](https://1337xx.to/) | ✅ | -133 |
579
- | [AnimeUnity](https://animeunity.so/) | ✅ | -ANI |
580
- | [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ | `-ILC` |
581
- | [CB01New](https://cb01new.gold/) | ✅ | -CB0 |
582
- | [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ | -DDL |
583
- | [GuardaSerie](https://guardaserie.now/) | ✅ | -GUA |
584
- | [MostraGuarda](https://mostraguarda.stream/) | ✅ | -MOS |
585
- | [StreamingCommunity](https://streamingcommunity.lu/) | ✅ | -STR |
586
-
587
-
588
605
  # Tutorials
589
606
 
590
607
  - [Windows Tutorial](https://www.youtube.com/watch?v=mZGqK4wdN-k)
@@ -31,7 +31,7 @@
31
31
 
32
32
  # 📋 Table of Contents
33
33
 
34
- - 🌐 [Website available](#website-status)
34
+ - 🔄 [Update Domains](#update-domains)
35
35
  - 🛠️ [Installation](#installation)
36
36
  - 📦 [PyPI Installation](#1-pypi-installation)
37
37
  - 🔄 [Automatic Installation](#2-automatic-installation)
@@ -58,18 +58,15 @@
58
58
  # Installation
59
59
 
60
60
  <p align="center">
61
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
61
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe" style="margin: 0 20px;">
62
62
  <img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
63
63
  </a>
64
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
64
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac" style="margin: 0 20px;">
65
65
  <img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
66
66
  </a>
67
- <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
67
+ <a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux" style="margin: 0 20px;">
68
68
  <img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
69
69
  </a>
70
- <a href="https://github.com/Arrowar/StreamingCommunity/releases">
71
- <img src="https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge" alt="All Versions">
72
- </a>
73
70
  </p>
74
71
 
75
72
 
@@ -450,6 +447,40 @@ You can download VLC Media Player from the [official website](https://www.videol
450
447
  - `get_only_link`: Return M3U8 playlist/index URL instead of downloading
451
448
 
452
449
 
450
+ ## Update Domains
451
+
452
+ There are two ways to update the domains for the supported websites:
453
+
454
+ ### 1. Using Local Configuration
455
+
456
+ 1. Create a `domains.json` file in the root directory of the project
457
+
458
+ 2. Add your domain configuration in the following format:
459
+ ```json
460
+ {
461
+ "altadefinizione": {
462
+ "domain": "si",
463
+ "full_url": "https://altadefinizione.si/"
464
+ },
465
+ ...
466
+ }
467
+ ```
468
+
469
+ 3. Set `use_api` to `false` in the `DEFAULT` section of your `config.json`:
470
+ ```json
471
+ {
472
+ "DEFAULT": {
473
+ "use_api": false
474
+ }
475
+ }
476
+ ```
477
+
478
+ ### 2. Using API (Legacy)
479
+
480
+ The API-based domain updates are currently deprecated. To use it anyway, set `use_api` to `true` in your `config.json` file.
481
+
482
+ Note: If `use_api` is set to `false` and no `domains.json` file is found, the script will raise an error.
483
+
453
484
  # COMMAND
454
485
 
455
486
  - Download a specific season by entering its number.
@@ -559,20 +590,6 @@ Start the bot from the folder /StreamingCommunity/TelegramHelp
559
590
  python3 telegram_bot.py
560
591
  ```
561
592
 
562
- # Website Status
563
-
564
- | Website | Status | Command |
565
- |:-------------------|:------:|:--------:|
566
- | [1337xx](https://1337xx.to/) | ✅ | -133 |
567
- | [AnimeUnity](https://animeunity.so/) | ✅ | -ANI |
568
- | [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ | `-ILC` |
569
- | [CB01New](https://cb01new.gold/) | ✅ | -CB0 |
570
- | [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ | -DDL |
571
- | [GuardaSerie](https://guardaserie.now/) | ✅ | -GUA |
572
- | [MostraGuarda](https://mostraguarda.stream/) | ✅ | -MOS |
573
- | [StreamingCommunity](https://streamingcommunity.lu/) | ✅ | -STR |
574
-
575
-
576
593
  # Tutorials
577
594
 
578
595
  - [Windows Tutorial](https://www.youtube.com/watch?v=mZGqK4wdN-k)
@@ -10,7 +10,7 @@ from bs4 import BeautifulSoup
10
10
 
11
11
  # Internal utilities
12
12
  from StreamingCommunity.Util._jsonConfig import config_manager
13
- from StreamingCommunity.Util.headers import get_headers
13
+ from StreamingCommunity.Util.headers import get_userAgent
14
14
 
15
15
 
16
16
  # Variable
@@ -22,7 +22,7 @@ class VideoSource:
22
22
  """
23
23
  Initializes the VideoSource object with default values.
24
24
  """
25
- self.headers = {'user-agent': get_headers()}
25
+ self.headers = {'user-agent': get_userAgent()}
26
26
  self.cookie = cookie
27
27
 
28
28
  def setup(self, url: str) -> None:
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
12
12
 
13
13
  # Internal utilities
14
14
  from StreamingCommunity.Util._jsonConfig import config_manager
15
- from StreamingCommunity.Util.headers import get_headers
15
+ from StreamingCommunity.Util.headers import get_userAgent
16
16
 
17
17
 
18
18
  # Variable
@@ -31,7 +31,7 @@ class VideoSource:
31
31
  self.redirect_url = None
32
32
  self.maxstream_url = None
33
33
  self.m3u8_url = None
34
- self.headers = {'user-agent': get_headers()}
34
+ self.headers = {'user-agent': get_userAgent()}
35
35
 
36
36
  def get_redirect_url(self):
37
37
  """
@@ -78,7 +78,7 @@ class VideoSource:
78
78
  logging.warning("Anchor tag not found. Trying the alternative method.")
79
79
  headers = {
80
80
  'origin': 'https://stayonline.pro',
81
- 'user-agent': get_headers(),
81
+ 'user-agent': get_userAgent(),
82
82
  'x-requested-with': 'XMLHttpRequest',
83
83
  }
84
84
 
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
12
12
 
13
13
  # Internal utilities
14
14
  from StreamingCommunity.Util._jsonConfig import config_manager
15
- from StreamingCommunity.Util.headers import get_headers
15
+ from StreamingCommunity.Util.headers import get_userAgent
16
16
 
17
17
 
18
18
  # Variable
@@ -30,7 +30,7 @@ class VideoSource:
30
30
  self.headers = {
31
31
  'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
32
32
  'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
33
- 'User-Agent': get_headers()
33
+ 'User-Agent': get_userAgent()
34
34
  }
35
35
  self.client = httpx.Client()
36
36
  self.url = url
@@ -11,7 +11,7 @@ from bs4 import BeautifulSoup
11
11
 
12
12
 
13
13
  # Internal utilities
14
- from StreamingCommunity.Util.headers import get_headers
14
+ from StreamingCommunity.Util.headers import get_userAgent
15
15
  from StreamingCommunity.Util.console import console
16
16
  from StreamingCommunity.Util._jsonConfig import config_manager
17
17
  from .Helper.Vixcloud.util import WindowVideo, WindowParameter, StreamsCollection
@@ -23,17 +23,16 @@ max_timeout = config_manager.get_int("REQUESTS", "timeout")
23
23
 
24
24
 
25
25
  class VideoSource:
26
- def __init__(self, site_name: str, is_series: bool):
26
+ def __init__(self, url: str, is_series: bool):
27
27
  """
28
28
  Initialize video source for streaming site.
29
29
 
30
30
  Args:
31
- site_name (str): Name of streaming site
32
- is_series (bool): Flag for series or movie content
31
+ - url (str): The URL of the streaming site.
32
+ - is_series (bool): Flag for series or movie content
33
33
  """
34
- self.headers = {'user-agent': get_headers()}
35
- self.base_name = site_name
36
- self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
34
+ self.headers = {'user-agent': get_userAgent()}
35
+ self.url = url
37
36
  self.is_series = is_series
38
37
 
39
38
  def setup(self, media_id: int):
@@ -64,7 +63,7 @@ class VideoSource:
64
63
 
65
64
  # Make a request to get iframe source
66
65
  response = httpx.get(
67
- url=f"https://{self.base_name}.{self.domain}/iframe/{self.media_id}",
66
+ url=f"{self.url}/iframe/{self.media_id}",
68
67
  params=params,
69
68
  timeout=max_timeout
70
69
  )
@@ -181,11 +180,11 @@ class VideoSource:
181
180
  """
182
181
  headers = {
183
182
  'referer': url_to_download,
184
- 'user-agent': get_headers(),
183
+ 'user-agent': get_userAgent(),
185
184
  }
186
185
 
187
186
  # API request to get video details
188
- video_api_url = f'https://{self.base_name}.{self.domain}/api/video/{scws_id}'
187
+ video_api_url = f'{self.url}/api/video/{scws_id}'
189
188
  response = httpx.get(video_api_url, headers=headers)
190
189
 
191
190
  if response.status_code == 200:
@@ -197,10 +196,10 @@ class VideoSource:
197
196
 
198
197
  # Request download link generation for each track
199
198
  download_response = httpx.post(
200
- url=f'https://{self.base_name}.{self.domain}/api/download/generate_link?scws_id={track["video_id"]}&rendition={track["quality"]}',
199
+ url=f'{self.url}/api/download/generate_link?scws_id={track["video_id"]}&rendition={track["quality"]}',
201
200
  headers={
202
201
  'referer': url_to_download,
203
- 'user-agent': get_headers(),
202
+ 'user-agent': get_userAgent(),
204
203
  'x-xsrf-token': config_manager.get("SITE", self.base_name)['extra']['x-xsrf-token']
205
204
  },
206
205
  cookies={
@@ -220,18 +219,17 @@ class VideoSource:
220
219
 
221
220
 
222
221
  class VideoSourceAnime(VideoSource):
223
- def __init__(self, site_name: str):
222
+ def __init__(self, url: str):
224
223
  """
225
224
  Initialize anime-specific video source.
226
225
 
227
226
  Args:
228
- site_name (str): Name of anime streaming site
227
+ - url (str): The URL of the streaming site.
229
228
 
230
229
  Extends base VideoSource with anime-specific initialization
231
230
  """
232
- self.headers = {'user-agent': get_headers()}
233
- self.base_name = site_name
234
- self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
231
+ self.headers = {'user-agent': get_userAgent()}
232
+ self.url = url
235
233
  self.src_mp4 = None
236
234
 
237
235
  def get_embed(self, episode_id: int):
@@ -247,7 +245,7 @@ class VideoSourceAnime(VideoSource):
247
245
  try:
248
246
 
249
247
  response = httpx.get(
250
- url=f"https://www.{self.base_name}.{self.domain}/embed-url/{episode_id}",
248
+ url=f"{self.url}/embed-url/{episode_id}",
251
249
  headers=self.headers,
252
250
  timeout=max_timeout
253
251
  )
@@ -1,5 +1,7 @@
1
1
  # 02.07.24
2
2
 
3
+ import sys
4
+
3
5
  # External libraries
4
6
  import httpx
5
7
  from bs4 import BeautifulSoup
@@ -8,7 +10,7 @@ from bs4 import BeautifulSoup
8
10
  # Internal utilities
9
11
  from StreamingCommunity.Util.console import console
10
12
  from StreamingCommunity.Util._jsonConfig import config_manager
11
- from StreamingCommunity.Util.headers import get_headers
13
+ from StreamingCommunity.Util.headers import get_userAgent
12
14
  from StreamingCommunity.Util.table import TVShowManager
13
15
 
14
16
 
@@ -42,13 +44,18 @@ def title_search(word_to_search: str) -> int:
42
44
  domain_to_use = site_constant.DOMAIN_NOW
43
45
 
44
46
  if not disable_searchDomain:
45
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
47
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
48
+
49
+ if domain_to_use is None or base_url is None:
50
+ console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
51
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
52
+ sys.exit(1)
46
53
 
47
54
  # Construct the full site URL and load the search page
48
55
  try:
49
56
  response = httpx.get(
50
- url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/search/{word_to_search}/1/",
51
- headers={'user-agent': get_headers()},
57
+ url=f"{site_constant.FULL_URL}/search/{word_to_search}/1/",
58
+ headers={'user-agent': get_userAgent()},
52
59
  follow_redirects=True,
53
60
  timeout=max_timeout
54
61
  )
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
12
12
  from StreamingCommunity.Util.console import console
13
13
  from StreamingCommunity.Util.os import os_manager
14
14
  from StreamingCommunity.Util.message import start_message
15
- from StreamingCommunity.Util.headers import get_headers
15
+ from StreamingCommunity.Util.headers import get_userAgent
16
16
  from StreamingCommunity.Lib.Downloader import TOR_downloader
17
17
 
18
18
 
@@ -41,11 +41,10 @@ def download_title(select_title: MediaItem):
41
41
  os_manager.create_path(mp4_path)
42
42
 
43
43
  # Make request to page with magnet
44
- full_site_name = f"{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}"
45
44
  response = httpx.get(
46
- url="https://" + full_site_name + select_title.url,
45
+ url=f"{site_constant.FULL_URL}{select_title.url}",
47
46
  headers={
48
- 'user-agent': get_headers()
47
+ 'user-agent': get_userAgent()
49
48
  },
50
49
  follow_redirects=True
51
50
  )
@@ -85,6 +85,7 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
85
85
 
86
86
  else:
87
87
  logging.error(f"Skip index: {index_select} cant find info with api.")
88
+ return None, True
88
89
 
89
90
 
90
91
  def download_series(select_title: MediaItem):
@@ -100,8 +101,8 @@ def download_series(select_title: MediaItem):
100
101
  if site_constant.TELEGRAM_BOT:
101
102
  bot = get_bot_instance()
102
103
 
103
- scrape_serie = ScrapeSerieAnime(site_constant.SITE_NAME)
104
- video_source = VideoSourceAnime(site_constant.SITE_NAME)
104
+ scrape_serie = ScrapeSerieAnime(site_constant.FULL_URL)
105
+ video_source = VideoSourceAnime(site_constant.FULL_URL)
105
106
 
106
107
  # Set up video source
107
108
  scrape_serie.setup(None, select_title.id, select_title.slug)
@@ -160,8 +161,8 @@ def download_film(select_title: MediaItem):
160
161
  """
161
162
 
162
163
  # Init class
163
- scrape_serie = ScrapeSerieAnime(site_constant.SITE_NAME)
164
- video_source = VideoSourceAnime(site_constant.SITE_NAME)
164
+ scrape_serie = ScrapeSerieAnime(site_constant.FULL_URL)
165
+ video_source = VideoSourceAnime(site_constant.FULL_URL)
165
166
 
166
167
  # Set up video source
167
168
  scrape_serie.setup(None, select_title.id, select_title.slug)
@@ -1,5 +1,6 @@
1
1
  # 10.12.23
2
2
 
3
+ import sys
3
4
  import logging
4
5
 
5
6
 
@@ -42,7 +43,7 @@ def get_token(site_name: str, domain: str) -> dict:
42
43
 
43
44
  # Send a GET request to the specified URL composed of the site name and domain
44
45
  response = httpx.get(
45
- url=f"https://www.{site_name}.{domain}",
46
+ url=site_constant.FULL_URL,
46
47
  timeout=max_timeout
47
48
  )
48
49
  response.raise_for_status()
@@ -113,7 +114,12 @@ def title_search(title: str) -> int:
113
114
  domain_to_use = site_constant.DOMAIN_NOW
114
115
 
115
116
  if not disable_searchDomain:
116
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://www.{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
117
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
118
+
119
+ if domain_to_use is None or base_url is None:
120
+ console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
121
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
122
+ sys.exit(1)
117
123
 
118
124
  data = get_token(site_constant.SITE_NAME, domain_to_use)
119
125
 
@@ -138,7 +144,7 @@ def title_search(title: str) -> int:
138
144
  # Send a POST request to the API endpoint for live search
139
145
  try:
140
146
  response = httpx.post(
141
- url=f'https://www.{site_constant.SITE_NAME}.{domain_to_use}/livesearch',
147
+ url=f'{site_constant.FULL_URL}/livesearch',
142
148
  cookies=cookies,
143
149
  headers=headers,
144
150
  json=json_data,
@@ -8,7 +8,7 @@ import httpx
8
8
 
9
9
 
10
10
  # Internal utilities
11
- from StreamingCommunity.Util.headers import get_headers
11
+ from StreamingCommunity.Util.headers import get_userAgent
12
12
  from StreamingCommunity.Util._jsonConfig import config_manager
13
13
  from StreamingCommunity.Api.Player.Helper.Vixcloud.util import EpisodeManager, Episode
14
14
 
@@ -18,18 +18,17 @@ max_timeout = config_manager.get_int("REQUESTS", "timeout")
18
18
 
19
19
 
20
20
 
21
- class ScrapeSerieAnime():
22
- def __init__(self, site_name: str):
21
+ class ScrapeSerieAnime:
22
+ def __init__(self, url: str):
23
23
  """
24
24
  Initialize the media scraper for a specific website.
25
25
 
26
26
  Args:
27
- site_name (str): Name of the streaming site to scrape
27
+ url (str): Url of the streaming site
28
28
  """
29
29
  self.is_series = False
30
- self.headers = {'user-agent': get_headers()}
31
- self.base_name = site_name
32
- self.domain = config_manager.get_dict('SITE', self.base_name)['domain']
30
+ self.headers = {'user-agent': get_userAgent()}
31
+ self.url = url
33
32
 
34
33
  def setup(self, version: str = None, media_id: int = None, series_name: str = None):
35
34
  self.version = version
@@ -50,7 +49,7 @@ class ScrapeSerieAnime():
50
49
  try:
51
50
 
52
51
  response = httpx.get(
53
- url=f"https://www.{self.base_name}.{self.domain}/info_api/{self.media_id}/",
52
+ url=f"{self.url}/info_api/{self.media_id}/",
54
53
  headers=self.headers,
55
54
  timeout=max_timeout
56
55
  )
@@ -81,7 +80,7 @@ class ScrapeSerieAnime():
81
80
  }
82
81
 
83
82
  response = httpx.get(
84
- url=f"https://www.{self.base_name}.{self.domain}/info_api/{self.media_id}/{index_ep}",
83
+ url=f"{self.url}/info_api/{self.media_id}/{index_ep}",
85
84
  headers=self.headers,
86
85
  params=params,
87
86
  timeout=max_timeout
@@ -1,13 +1,16 @@
1
1
  # 03.07.24
2
2
 
3
+ import sys
4
+
3
5
  # External libraries
4
6
  import httpx
5
7
  from bs4 import BeautifulSoup
6
8
 
7
9
 
8
10
  # Internal utilities
11
+ from StreamingCommunity.Util.console import console
9
12
  from StreamingCommunity.Util._jsonConfig import config_manager
10
- from StreamingCommunity.Util.headers import get_headers
13
+ from StreamingCommunity.Util.headers import get_userAgent
11
14
  from StreamingCommunity.Util.table import TVShowManager
12
15
 
13
16
 
@@ -41,11 +44,16 @@ def title_search(word_to_search: str) -> int:
41
44
  domain_to_use = site_constant.DOMAIN_NOW
42
45
 
43
46
  if not disable_searchDomain:
44
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
47
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
48
+
49
+ if domain_to_use is None or base_url is None:
50
+ console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
51
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
52
+ sys.exit(1)
45
53
 
46
54
  response = httpx.get(
47
- url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/?s={word_to_search}",
48
- headers={'user-agent': get_headers()},
55
+ url=f"{site_constant.FULL_URL}/?s={word_to_search}",
56
+ headers={'user-agent': get_userAgent()},
49
57
  timeout=max_timeout
50
58
  )
51
59
  response.raise_for_status()
@@ -1,5 +1,6 @@
1
1
  # 09.06.24
2
2
 
3
+ import sys
3
4
  import logging
4
5
 
5
6
 
@@ -11,7 +12,7 @@ from bs4 import BeautifulSoup
11
12
  # Internal utilities
12
13
  from StreamingCommunity.Util.console import console
13
14
  from StreamingCommunity.Util._jsonConfig import config_manager
14
- from StreamingCommunity.Util.headers import get_headers
15
+ from StreamingCommunity.Util.headers import get_userAgent
15
16
  from StreamingCommunity.Util.table import TVShowManager
16
17
 
17
18
 
@@ -45,13 +46,18 @@ def title_search(word_to_search: str) -> int:
45
46
  domain_to_use = site_constant.DOMAIN_NOW
46
47
 
47
48
  if not disable_searchDomain:
48
- domain_to_use, base_url = search_domain(site_constant.SITE_NAME, f"https://{site_constant.SITE_NAME}.{site_constant.DOMAIN_NOW}")
49
+ domain_to_use, base_url = search_domain(site_constant.SITE_NAME, site_constant.FULL_URL)
50
+
51
+ if domain_to_use is None or base_url is None:
52
+ console.print("[bold red]❌ Error: Unable to determine valid domain or base URL.[/bold red]")
53
+ console.print("[yellow]The service might be temporarily unavailable or the domain may have changed.[/yellow]")
54
+ sys.exit(1)
49
55
 
50
56
  # Send request to search for titles
51
57
  try:
52
58
  response = httpx.get(
53
- url=f"https://{site_constant.SITE_NAME}.{domain_to_use}/search/?&q={word_to_search}&quick=1&type=videobox_video&nodes=11",
54
- headers={'user-agent': get_headers()},
59
+ url=f"{site_constant.FULL_URL}/search/?&q={word_to_search}&quick=1&type=videobox_video&nodes=11",
60
+ headers={'user-agent': get_userAgent()},
55
61
  timeout=max_timeout
56
62
  )
57
63
  response.raise_for_status()
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
12
12
 
13
13
  # Internal utilities
14
14
  from StreamingCommunity.Util._jsonConfig import config_manager
15
- from StreamingCommunity.Util.headers import get_headers
15
+ from StreamingCommunity.Util.headers import get_userAgent
16
16
 
17
17
 
18
18
  # Logic class
@@ -31,7 +31,7 @@ class GetSerieInfo:
31
31
  Parameters:
32
32
  - dict_serie (MediaItem): Dictionary containing series information (optional).
33
33
  """
34
- self.headers = {'user-agent': get_headers()}
34
+ self.headers = {'user-agent': get_userAgent()}
35
35
  self.cookies = cookies
36
36
  self.url = dict_serie.url
37
37
  self.tv_name = None