StreamingCommunity 2.9.5__tar.gz → 2.9.7__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.
- {streamingcommunity-2.9.5/StreamingCommunity.egg-info → streamingcommunity-2.9.7}/PKG-INFO +20 -12
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/README.md +17 -10
- streamingcommunity-2.9.7/StreamingCommunity/Api/Player/sweetpixel.py +49 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/1337xx/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/1337xx/title.py +4 -6
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/altadefinizione/film.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/altadefinizione/series.py +1 -2
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/altadefinizione/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/animeunity/film_serie.py +3 -4
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/animeunity/site.py +4 -4
- streamingcommunity-2.9.7/StreamingCommunity/Api/Site/animeworld/__init__.py +71 -0
- streamingcommunity-2.9.7/StreamingCommunity/Api/Site/animeworld/serie.py +107 -0
- streamingcommunity-2.9.7/StreamingCommunity/Api/Site/animeworld/site.py +111 -0
- streamingcommunity-2.9.7/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +79 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/cb01new/film.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/cb01new/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +2 -2
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/guardaserie/series.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/guardaserie/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/mostraguarda/film.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/streamingcommunity/film.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/streamingcommunity/series.py +1 -2
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/streamingcommunity/site.py +3 -3
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/Downloader/HLS/segments.py +1 -3
- streamingcommunity-2.9.7/StreamingCommunity/Lib/Downloader/TOR/downloader.py +476 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/FFmpeg/util.py +12 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/M3U8/estimator.py +5 -8
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Upload/update.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Upload/version.py +1 -1
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/run.py +10 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7/StreamingCommunity.egg-info}/PKG-INFO +20 -12
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity.egg-info/SOURCES.txt +5 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/setup.py +1 -1
- streamingcommunity-2.9.5/StreamingCommunity/Lib/Downloader/TOR/downloader.py +0 -306
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/LICENSE +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/MANIFEST.in +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/ddl.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/maxstream.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/supervideo.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/1337xx/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/animeunity/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/cb01new/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/guardaserie/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/mostraguarda/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/config_loader.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Template/site.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/FFmpeg/capture.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/color.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/config_json.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/ffmpeg_installer.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/headers.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/logger.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/message.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/os.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Util/table.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/__init__.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/global_search.py +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity.egg-info/entry_points.txt +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity.egg-info/requires.txt +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity.egg-info/top_level.txt +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/requirements.txt +0 -0
- {streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: StreamingCommunity
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.7
|
|
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
|
|
@@ -28,12 +28,13 @@ Dynamic: description
|
|
|
28
28
|
Dynamic: description-content-type
|
|
29
29
|
Dynamic: home-page
|
|
30
30
|
Dynamic: keywords
|
|
31
|
+
Dynamic: license-file
|
|
31
32
|
Dynamic: project-url
|
|
32
33
|
Dynamic: requires-dist
|
|
33
34
|
Dynamic: requires-python
|
|
34
35
|
|
|
35
36
|
<p align="center">
|
|
36
|
-
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="
|
|
37
|
+
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="600"/>
|
|
37
38
|
</p>
|
|
38
39
|
|
|
39
40
|
<p align="center">
|
|
@@ -66,6 +67,7 @@ Dynamic: requires-python
|
|
|
66
67
|
# 📋 Table of Contents
|
|
67
68
|
|
|
68
69
|
- 🔄 [Update Domains](#update-domains)
|
|
70
|
+
- 🌐 [Available Sites](https://arrowar.github.io/StreamingDirectory/)
|
|
69
71
|
- 🛠️ [Installation](#installation)
|
|
70
72
|
- 📦 [PyPI Installation](#1-pypi-installation)
|
|
71
73
|
- 🔄 [Automatic Installation](#2-automatic-installation)
|
|
@@ -94,18 +96,23 @@ Dynamic: requires-python
|
|
|
94
96
|
# Installation
|
|
95
97
|
|
|
96
98
|
<p align="center">
|
|
97
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe"
|
|
99
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
|
|
98
100
|
<img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
|
99
101
|
</a>
|
|
100
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac"
|
|
102
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
|
|
101
103
|
<img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
|
|
102
104
|
</a>
|
|
103
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux"
|
|
105
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
|
|
104
106
|
<img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
|
|
105
107
|
</a>
|
|
108
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux_previous">
|
|
109
|
+
<img src="https://img.shields.io/badge/-Linux Previous-gray.svg?style=for-the-badge&logo=linux" alt="Linux Previous">
|
|
110
|
+
</a>
|
|
111
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases">
|
|
112
|
+
<img src="https://img.shields.io/badge/-All Versions-lightgrey.svg?style=for-the-badge&logo=github" alt="All Versions">
|
|
113
|
+
</a>
|
|
106
114
|
</p>
|
|
107
115
|
|
|
108
|
-
|
|
109
116
|
## 1. PyPI Installation
|
|
110
117
|
|
|
111
118
|
Install directly from PyPI:
|
|
@@ -199,13 +206,10 @@ from StreamingCommunity.Download import TOR_downloader
|
|
|
199
206
|
client = TOR_downloader()
|
|
200
207
|
|
|
201
208
|
# Add magnet link
|
|
202
|
-
client.add_magnet_link("magnet:?xt=urn:btih:example_hash&dn=example_name")
|
|
209
|
+
client.add_magnet_link("magnet:?xt=urn:btih:example_hash&dn=example_name", save_path=".")
|
|
203
210
|
|
|
204
211
|
# Start download
|
|
205
212
|
client.start_download()
|
|
206
|
-
|
|
207
|
-
# Move downloaded files to specific location
|
|
208
|
-
client.move_downloaded_files("/downloads/torrents/")
|
|
209
213
|
```
|
|
210
214
|
|
|
211
215
|
See [Torrent example](./Test/Download/TOR.py) for complete usage.
|
|
@@ -386,7 +390,9 @@ The configuration file is divided into several main sections:
|
|
|
386
390
|
"show_trending": true,
|
|
387
391
|
"use_api": true,
|
|
388
392
|
"not_close": false,
|
|
389
|
-
"telegram_bot": false
|
|
393
|
+
"telegram_bot": false,
|
|
394
|
+
"download_site_data": false,
|
|
395
|
+
"validate_github_config": false
|
|
390
396
|
}
|
|
391
397
|
}
|
|
392
398
|
```
|
|
@@ -399,6 +405,8 @@ The configuration file is divided into several main sections:
|
|
|
399
405
|
- `not_close`: If set to true, keeps the program running after download is complete
|
|
400
406
|
* Can be changed from terminal with `--not_close true/false`
|
|
401
407
|
- `telegram_bot`: Enables Telegram bot integration
|
|
408
|
+
- `download_site_data`: If set to false, disables automatic site data download
|
|
409
|
+
- `validate_github_config`: If set to false, disables validation and updating of configuration from GitHub
|
|
402
410
|
|
|
403
411
|
## OUT_FOLDER Settings
|
|
404
412
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="
|
|
2
|
+
<img src="https://i.ibb.co/v6RnT0wY/s2.jpg" alt="Project Logo" width="600"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
# 📋 Table of Contents
|
|
33
33
|
|
|
34
34
|
- 🔄 [Update Domains](#update-domains)
|
|
35
|
+
- 🌐 [Available Sites](https://arrowar.github.io/StreamingDirectory/)
|
|
35
36
|
- 🛠️ [Installation](#installation)
|
|
36
37
|
- 📦 [PyPI Installation](#1-pypi-installation)
|
|
37
38
|
- 🔄 [Automatic Installation](#2-automatic-installation)
|
|
@@ -60,18 +61,23 @@
|
|
|
60
61
|
# Installation
|
|
61
62
|
|
|
62
63
|
<p align="center">
|
|
63
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe"
|
|
64
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_win.exe">
|
|
64
65
|
<img src="https://img.shields.io/badge/-Windows-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
|
65
66
|
</a>
|
|
66
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac"
|
|
67
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_mac">
|
|
67
68
|
<img src="https://img.shields.io/badge/-macOS-black.svg?style=for-the-badge&logo=apple" alt="macOS">
|
|
68
69
|
</a>
|
|
69
|
-
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux"
|
|
70
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux">
|
|
70
71
|
<img src="https://img.shields.io/badge/-Linux-orange.svg?style=for-the-badge&logo=linux" alt="Linux">
|
|
71
72
|
</a>
|
|
73
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases/latest/download/StreamingCommunity_linux_previous">
|
|
74
|
+
<img src="https://img.shields.io/badge/-Linux Previous-gray.svg?style=for-the-badge&logo=linux" alt="Linux Previous">
|
|
75
|
+
</a>
|
|
76
|
+
<a href="https://github.com/Arrowar/StreamingCommunity/releases">
|
|
77
|
+
<img src="https://img.shields.io/badge/-All Versions-lightgrey.svg?style=for-the-badge&logo=github" alt="All Versions">
|
|
78
|
+
</a>
|
|
72
79
|
</p>
|
|
73
80
|
|
|
74
|
-
|
|
75
81
|
## 1. PyPI Installation
|
|
76
82
|
|
|
77
83
|
Install directly from PyPI:
|
|
@@ -165,13 +171,10 @@ from StreamingCommunity.Download import TOR_downloader
|
|
|
165
171
|
client = TOR_downloader()
|
|
166
172
|
|
|
167
173
|
# Add magnet link
|
|
168
|
-
client.add_magnet_link("magnet:?xt=urn:btih:example_hash&dn=example_name")
|
|
174
|
+
client.add_magnet_link("magnet:?xt=urn:btih:example_hash&dn=example_name", save_path=".")
|
|
169
175
|
|
|
170
176
|
# Start download
|
|
171
177
|
client.start_download()
|
|
172
|
-
|
|
173
|
-
# Move downloaded files to specific location
|
|
174
|
-
client.move_downloaded_files("/downloads/torrents/")
|
|
175
178
|
```
|
|
176
179
|
|
|
177
180
|
See [Torrent example](./Test/Download/TOR.py) for complete usage.
|
|
@@ -352,7 +355,9 @@ The configuration file is divided into several main sections:
|
|
|
352
355
|
"show_trending": true,
|
|
353
356
|
"use_api": true,
|
|
354
357
|
"not_close": false,
|
|
355
|
-
"telegram_bot": false
|
|
358
|
+
"telegram_bot": false,
|
|
359
|
+
"download_site_data": false,
|
|
360
|
+
"validate_github_config": false
|
|
356
361
|
}
|
|
357
362
|
}
|
|
358
363
|
```
|
|
@@ -365,6 +370,8 @@ The configuration file is divided into several main sections:
|
|
|
365
370
|
- `not_close`: If set to true, keeps the program running after download is complete
|
|
366
371
|
* Can be changed from terminal with `--not_close true/false`
|
|
367
372
|
- `telegram_bot`: Enables Telegram bot integration
|
|
373
|
+
- `download_site_data`: If set to false, disables automatic site data download
|
|
374
|
+
- `validate_github_config`: If set to false, disables validation and updating of configuration from GitHub
|
|
368
375
|
|
|
369
376
|
## OUT_FOLDER Settings
|
|
370
377
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 21.03.25
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# External libraries
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Internal utilities
|
|
11
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
12
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Variable
|
|
16
|
+
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class AnimeWorldPlayer:
|
|
20
|
+
def __init__(self, full_url, episode_data, session_id, csrf_token):
|
|
21
|
+
"""Initialize the AnimeWorldPlayer with session details, episode data, and URL."""
|
|
22
|
+
self.session_id = session_id
|
|
23
|
+
self.csrf_token = csrf_token
|
|
24
|
+
self.episode_data = episode_data
|
|
25
|
+
self.number = episode_data['number']
|
|
26
|
+
self.link = episode_data['link']
|
|
27
|
+
|
|
28
|
+
# Create an HTTP client with session cookies, headers, and base URL.
|
|
29
|
+
self.client = httpx.Client(
|
|
30
|
+
cookies={"sessionId": session_id},
|
|
31
|
+
headers={"User-Agent": get_userAgent(), "csrf-token": csrf_token},
|
|
32
|
+
base_url=full_url,
|
|
33
|
+
timeout=MAX_TIMEOUT
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def get_download_link(self):
|
|
37
|
+
"""Fetch the download link from AnimeWorld using the episode link."""
|
|
38
|
+
try:
|
|
39
|
+
# Make a POST request to the episode link and follow any redirects
|
|
40
|
+
res = self.client.post(self.link, follow_redirects=True)
|
|
41
|
+
data = res.json()
|
|
42
|
+
|
|
43
|
+
# Extract the first available server link and return it after modifying the URL
|
|
44
|
+
server_link = data["links"]["9"][list(data["links"]["9"].keys())[0]]["link"]
|
|
45
|
+
return server_link.replace('download-file.php?id=', '')
|
|
46
|
+
|
|
47
|
+
except Exception as e:
|
|
48
|
+
logging.error(f"Error in new API system: {e}")
|
|
49
|
+
return None
|
{streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/1337xx/site.py
RENAMED
|
@@ -26,12 +26,12 @@ table_show_manager = TVShowManager()
|
|
|
26
26
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def title_search(
|
|
29
|
+
def title_search(query: str) -> int:
|
|
30
30
|
"""
|
|
31
31
|
Search for titles based on a search query.
|
|
32
32
|
|
|
33
33
|
Parameters:
|
|
34
|
-
-
|
|
34
|
+
- query (str): The query to search for.
|
|
35
35
|
|
|
36
36
|
Returns:
|
|
37
37
|
- int: The number of titles found.
|
|
@@ -39,7 +39,7 @@ def title_search(word_to_search: str) -> int:
|
|
|
39
39
|
media_search_manager.clear()
|
|
40
40
|
table_show_manager.clear()
|
|
41
41
|
|
|
42
|
-
search_url = f"{site_constant.FULL_URL}/search/{
|
|
42
|
+
search_url = f"{site_constant.FULL_URL}/search/{query}/1/"
|
|
43
43
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
44
44
|
|
|
45
45
|
try:
|
{streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/1337xx/title.py
RENAMED
|
@@ -33,9 +33,8 @@ def download_title(select_title: MediaItem):
|
|
|
33
33
|
- select_title (MediaItem): The media item to be downloaded. This should be an instance of the MediaItem class, containing attributes like `name` and `url`.
|
|
34
34
|
"""
|
|
35
35
|
start_message()
|
|
36
|
-
console.print(f"[yellow]Download:
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [cyan]{select_title.name}[/cyan] \n")
|
|
37
|
+
|
|
39
38
|
# Define output path
|
|
40
39
|
title_name = os_manager.get_sanitize_file(select_title.name)
|
|
41
40
|
mp4_path = os.path.join(site_constant.MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
|
@@ -58,6 +57,5 @@ def download_title(select_title: MediaItem):
|
|
|
58
57
|
|
|
59
58
|
# Tor manager
|
|
60
59
|
manager = TOR_downloader()
|
|
61
|
-
manager.add_magnet_link(final_url)
|
|
62
|
-
manager.start_download()
|
|
63
|
-
manager.move_downloaded_files(mp4_path)
|
|
60
|
+
manager.add_magnet_link(final_url, save_path=mp4_path)
|
|
61
|
+
manager.start_download()
|
|
@@ -56,7 +56,7 @@ def download_film(select_title: MediaItem) -> str:
|
|
|
56
56
|
TelegramSession.updateScriptId(script_id, select_title.name)
|
|
57
57
|
|
|
58
58
|
start_message()
|
|
59
|
-
console.print(f"[yellow]Download: [red]{select_title.name} \n")
|
|
59
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [cyan]{select_title.name}[/cyan] \n")
|
|
60
60
|
|
|
61
61
|
# Extract mostraguarda link
|
|
62
62
|
try:
|
|
@@ -55,8 +55,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
|
|
|
55
55
|
|
|
56
56
|
# Get info about episode
|
|
57
57
|
obj_episode = scrape_serie.seasons_manager.get_season_by_number(int(index_season_selected)).episodes.get(index_episode_selected-1)
|
|
58
|
-
console.print(f"[yellow]Download: [red]{
|
|
59
|
-
print()
|
|
58
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [bold magenta]{obj_episode.name}[/bold magenta] ([cyan]S{index_season_selected}E{index_episode_selected}[/cyan]) \n")
|
|
60
59
|
|
|
61
60
|
if site_constant.TELEGRAM_BOT:
|
|
62
61
|
bot = get_bot_instance()
|
|
@@ -26,12 +26,12 @@ table_show_manager = TVShowManager()
|
|
|
26
26
|
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def title_search(
|
|
29
|
+
def title_search(query: str) -> int:
|
|
30
30
|
"""
|
|
31
31
|
Search for titles based on a search query.
|
|
32
32
|
|
|
33
33
|
Parameters:
|
|
34
|
-
-
|
|
34
|
+
- query (str): The query to search for.
|
|
35
35
|
|
|
36
36
|
Returns:
|
|
37
37
|
int: The number of titles found.
|
|
@@ -42,7 +42,7 @@ def title_search(title_search: str) -> int:
|
|
|
42
42
|
media_search_manager.clear()
|
|
43
43
|
table_show_manager.clear()
|
|
44
44
|
|
|
45
|
-
search_url = f"{site_constant.FULL_URL}/?story={
|
|
45
|
+
search_url = f"{site_constant.FULL_URL}/?story={query}&do=search&subaction=search"
|
|
46
46
|
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
47
47
|
|
|
48
48
|
try:
|
|
@@ -55,8 +55,7 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
|
|
55
55
|
if obj_episode is not None:
|
|
56
56
|
|
|
57
57
|
start_message()
|
|
58
|
-
console.print(f"[yellow]Download:
|
|
59
|
-
console.print("[cyan]You can safely stop the download with [bold]Ctrl+c[bold] [cyan] \n")
|
|
58
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] ([cyan]E{obj_episode.number}[/cyan]) \n")
|
|
60
59
|
|
|
61
60
|
if site_constant.TELEGRAM_BOT:
|
|
62
61
|
bot.send_message(f"Download in corso:\nTitolo:{scrape_serie.series_name}\nEpisodio: {obj_episode.number}", None)
|
|
@@ -70,7 +69,7 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
|
|
70
69
|
video_source.get_embed(obj_episode.id)
|
|
71
70
|
|
|
72
71
|
# Create output path
|
|
73
|
-
|
|
72
|
+
mp4_name = f"{scrape_serie.series_name}_EP_{dynamic_format_number(str(obj_episode.number))}.mp4"
|
|
74
73
|
|
|
75
74
|
if scrape_serie.is_series:
|
|
76
75
|
mp4_path = os_manager.get_sanitize_path(os.path.join(site_constant.ANIME_FOLDER, scrape_serie.series_name))
|
|
@@ -84,7 +83,7 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
|
|
84
83
|
# Start downloading
|
|
85
84
|
path, kill_handler = MP4_downloader(
|
|
86
85
|
url=str(video_source.src_mp4).strip(),
|
|
87
|
-
path=os.path.join(mp4_path,
|
|
86
|
+
path=os.path.join(mp4_path, mp4_name)
|
|
88
87
|
)
|
|
89
88
|
|
|
90
89
|
return path, kill_handler
|
{streamingcommunity-2.9.5 → streamingcommunity-2.9.7}/StreamingCommunity/Api/Site/animeunity/site.py
RENAMED
|
@@ -83,12 +83,12 @@ def get_real_title(record):
|
|
|
83
83
|
return record['title_it']
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
def title_search(
|
|
86
|
+
def title_search(query: str) -> int:
|
|
87
87
|
"""
|
|
88
|
-
Function to perform an anime search using a provided
|
|
88
|
+
Function to perform an anime search using a provided query.
|
|
89
89
|
|
|
90
90
|
Parameters:
|
|
91
|
-
-
|
|
91
|
+
- query (str): The query to search for.
|
|
92
92
|
|
|
93
93
|
Returns:
|
|
94
94
|
- int: A number containing the length of media search manager.
|
|
@@ -106,7 +106,7 @@ def title_search(title: str) -> int:
|
|
|
106
106
|
'user-agent': get_userAgent(),
|
|
107
107
|
'x-csrf-token': data.get('csrf_token')
|
|
108
108
|
}
|
|
109
|
-
json_data = {'title':
|
|
109
|
+
json_data = {'title': query}
|
|
110
110
|
|
|
111
111
|
# Send a POST request to the API endpoint for live search
|
|
112
112
|
try:
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# 21.03.25
|
|
2
|
+
|
|
3
|
+
# External library
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
from rich.prompt import Prompt
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Internal utilities
|
|
9
|
+
from StreamingCommunity.Api.Template import get_select_title
|
|
10
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
11
|
+
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Logic class
|
|
15
|
+
from .site import title_search, media_search_manager, table_show_manager
|
|
16
|
+
from .serie import download_series
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Variable
|
|
20
|
+
indice = 8
|
|
21
|
+
_useFor = "anime"
|
|
22
|
+
_deprecate = False
|
|
23
|
+
_priority = 2
|
|
24
|
+
_engineDownload = "mp4"
|
|
25
|
+
|
|
26
|
+
msg = Prompt()
|
|
27
|
+
console = Console()
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def process_search_result(select_title):
|
|
32
|
+
"""
|
|
33
|
+
Handles the search result and initiates the download for either a film or series.
|
|
34
|
+
"""
|
|
35
|
+
if select_title.type == "TV":
|
|
36
|
+
download_series(select_title)
|
|
37
|
+
|
|
38
|
+
def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_item: dict = None):
|
|
39
|
+
"""
|
|
40
|
+
Main function of the application for search film, series and anime.
|
|
41
|
+
|
|
42
|
+
Parameters:
|
|
43
|
+
string_to_search (str, optional): String to search for
|
|
44
|
+
get_onlyDatabase (bool, optional): If True, return only the database object
|
|
45
|
+
direct_item (dict, optional): Direct item to process (bypass search)
|
|
46
|
+
"""
|
|
47
|
+
if direct_item:
|
|
48
|
+
select_title = MediaItem(**direct_item)
|
|
49
|
+
process_search_result(select_title)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
# Get the user input for the search term
|
|
53
|
+
string_to_search = msg.ask(f"\n[purple]Insert a word to search in [green]{site_constant.SITE_NAME}").strip()
|
|
54
|
+
|
|
55
|
+
# Perform the database search
|
|
56
|
+
len_database = title_search(string_to_search)
|
|
57
|
+
|
|
58
|
+
##If only the database is needed, return the manager
|
|
59
|
+
if get_onlyDatabase:
|
|
60
|
+
return media_search_manager
|
|
61
|
+
|
|
62
|
+
if len_database > 0:
|
|
63
|
+
select_title = get_select_title(table_show_manager, media_search_manager)
|
|
64
|
+
process_search_result(select_title)
|
|
65
|
+
|
|
66
|
+
else:
|
|
67
|
+
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
|
|
68
|
+
|
|
69
|
+
# If no results are found, ask again
|
|
70
|
+
string_to_search = msg.ask(f"\n[purple]Insert a word to search in [green]{site_constant.SITE_NAME}").strip()
|
|
71
|
+
search()
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# 11.03.24
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import logging
|
|
5
|
+
from typing import Tuple
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# External library
|
|
9
|
+
from rich.console import Console
|
|
10
|
+
from rich.prompt import Prompt
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Internal utilities
|
|
14
|
+
from StreamingCommunity.Util.os import os_manager
|
|
15
|
+
from StreamingCommunity.Util.message import start_message
|
|
16
|
+
from StreamingCommunity.Lib.Downloader import MP4_downloader
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Logic class
|
|
20
|
+
from .util.ScrapeSerie import ScrapSerie
|
|
21
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
22
|
+
from StreamingCommunity.Api.Template.Util import manage_selection, dynamic_format_number, map_episode_title
|
|
23
|
+
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# Player
|
|
27
|
+
from StreamingCommunity.Api.Player.sweetpixel import AnimeWorldPlayer
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Variable
|
|
31
|
+
console = Console()
|
|
32
|
+
msg = Prompt()
|
|
33
|
+
KILL_HANDLER = bool(False)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def download_episode(index_select: int, scrape_serie: ScrapSerie, episodes) -> Tuple[str,bool]:
|
|
38
|
+
"""
|
|
39
|
+
Downloads the selected episode.
|
|
40
|
+
|
|
41
|
+
Parameters:
|
|
42
|
+
- index_select (int): Index of the episode to download.
|
|
43
|
+
|
|
44
|
+
Return:
|
|
45
|
+
- str: output path
|
|
46
|
+
- bool: kill handler status
|
|
47
|
+
"""
|
|
48
|
+
start_message()
|
|
49
|
+
|
|
50
|
+
# Get information about the selected episode
|
|
51
|
+
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] ([cyan]E{index_select+1}[/cyan]) \n")
|
|
52
|
+
|
|
53
|
+
# Define filename and path for the downloaded video
|
|
54
|
+
mp4_name = f"{scrape_serie.get_name()}_EP_{dynamic_format_number(str(index_select+1))}.mp4"
|
|
55
|
+
mp4_path = os.path.join(site_constant.ANIME_FOLDER, scrape_serie.get_name())
|
|
56
|
+
|
|
57
|
+
# Create output folder
|
|
58
|
+
os_manager.create_path(mp4_path)
|
|
59
|
+
|
|
60
|
+
# Collect mp4 link
|
|
61
|
+
video_source = AnimeWorldPlayer(site_constant.FULL_URL, episodes[index_select], scrape_serie.session_id, scrape_serie.csrf_token)
|
|
62
|
+
mp4_link = video_source.get_download_link()
|
|
63
|
+
|
|
64
|
+
# Start downloading
|
|
65
|
+
path, kill_handler = MP4_downloader(
|
|
66
|
+
url=str(mp4_link).strip(),
|
|
67
|
+
path=os.path.join(mp4_path, mp4_name)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return path, kill_handler
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def download_series(select_title: MediaItem):
|
|
74
|
+
"""
|
|
75
|
+
Function to download episodes of a TV series.
|
|
76
|
+
|
|
77
|
+
Parameters:
|
|
78
|
+
- tv_id (int): The ID of the TV series.
|
|
79
|
+
- tv_name (str): The name of the TV series.
|
|
80
|
+
"""
|
|
81
|
+
start_message()
|
|
82
|
+
|
|
83
|
+
scrape_serie = ScrapSerie(select_title.url, site_constant.FULL_URL)
|
|
84
|
+
|
|
85
|
+
# Get the count of episodes for the TV series
|
|
86
|
+
episodes = scrape_serie.get_episodes()
|
|
87
|
+
episoded_count = len(episodes)
|
|
88
|
+
console.print(f"[cyan]Episodes find: [red]{episoded_count}")
|
|
89
|
+
|
|
90
|
+
# Prompt user to select an episode index
|
|
91
|
+
last_command = msg.ask("\n[cyan]Insert media [red]index [yellow]or [red]* [cyan]to download all media [yellow]or [red]1-2 [cyan]or [red]3-* [cyan]for a range of media")
|
|
92
|
+
|
|
93
|
+
# Manage user selection
|
|
94
|
+
list_episode_select = manage_selection(last_command, episoded_count)
|
|
95
|
+
|
|
96
|
+
# Download selected episodes
|
|
97
|
+
if len(list_episode_select) == 1 and last_command != "*":
|
|
98
|
+
path, _ = download_episode(list_episode_select[0]-1, scrape_serie, episodes)
|
|
99
|
+
return path
|
|
100
|
+
|
|
101
|
+
# Download all other episodes selecter
|
|
102
|
+
else:
|
|
103
|
+
kill_handler = False
|
|
104
|
+
for i_episode in list_episode_select:
|
|
105
|
+
if kill_handler:
|
|
106
|
+
break
|
|
107
|
+
_, kill_handler = download_episode(i_episode-1, scrape_serie, episodes)
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# 21.03.25
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
# External libraries
|
|
6
|
+
import httpx
|
|
7
|
+
from bs4 import BeautifulSoup
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Internal utilities
|
|
12
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
13
|
+
from StreamingCommunity.Util.headers import get_userAgent, get_headers
|
|
14
|
+
from StreamingCommunity.Util.table import TVShowManager
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Logic class
|
|
18
|
+
from StreamingCommunity.Api.Template.config_loader import site_constant
|
|
19
|
+
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Variable
|
|
23
|
+
console = Console()
|
|
24
|
+
media_search_manager = MediaManager()
|
|
25
|
+
table_show_manager = TVShowManager()
|
|
26
|
+
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_session_and_csrf() -> dict:
|
|
30
|
+
"""
|
|
31
|
+
Get the session ID and CSRF token from the website's cookies and HTML meta data.
|
|
32
|
+
"""
|
|
33
|
+
# Send an initial GET request to the website
|
|
34
|
+
response = httpx.get(site_constant.FULL_URL, headers=get_headers())
|
|
35
|
+
|
|
36
|
+
# Extract the sessionId from the cookies
|
|
37
|
+
session_id = response.cookies.get('sessionId')
|
|
38
|
+
logging.info(f"Session ID: {session_id}")
|
|
39
|
+
|
|
40
|
+
# Use BeautifulSoup to parse the HTML and extract the CSRF-Token
|
|
41
|
+
soup = BeautifulSoup(response.text, 'html.parser')
|
|
42
|
+
|
|
43
|
+
# Try to find the CSRF token in a meta tag or hidden input
|
|
44
|
+
csrf_token = None
|
|
45
|
+
meta_tag = soup.find('meta', {'name': 'csrf-token'})
|
|
46
|
+
if meta_tag:
|
|
47
|
+
csrf_token = meta_tag.get('content')
|
|
48
|
+
|
|
49
|
+
# If it's not in the meta tag, check for hidden input fields
|
|
50
|
+
if not csrf_token:
|
|
51
|
+
input_tag = soup.find('input', {'name': '_csrf'})
|
|
52
|
+
if input_tag:
|
|
53
|
+
csrf_token = input_tag.get('value')
|
|
54
|
+
|
|
55
|
+
logging.info(f"CSRF Token: {csrf_token}")
|
|
56
|
+
return session_id, csrf_token
|
|
57
|
+
|
|
58
|
+
def title_search(query: str) -> int:
|
|
59
|
+
"""
|
|
60
|
+
Function to perform an anime search using a provided title.
|
|
61
|
+
|
|
62
|
+
Parameters:
|
|
63
|
+
- query (str): The query to search for.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
- int: A number containing the length of media search manager.
|
|
67
|
+
"""
|
|
68
|
+
search_url = f"{site_constant.FULL_URL}/search?keyword={query}"
|
|
69
|
+
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
|
70
|
+
|
|
71
|
+
# Make the GET request
|
|
72
|
+
try:
|
|
73
|
+
response = httpx.get(search_url, headers={'User-Agent': get_userAgent()})
|
|
74
|
+
|
|
75
|
+
except Exception as e:
|
|
76
|
+
console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
|
|
77
|
+
return 0
|
|
78
|
+
|
|
79
|
+
# Create soup istance
|
|
80
|
+
soup = BeautifulSoup(response.text, 'html.parser')
|
|
81
|
+
|
|
82
|
+
# Collect data from soup
|
|
83
|
+
for element in soup.find_all('a', class_='poster'):
|
|
84
|
+
try:
|
|
85
|
+
title = element.find('img').get('alt')
|
|
86
|
+
url = f"{site_constant.FULL_URL}{element.get('href')}"
|
|
87
|
+
status_div = element.find('div', class_='status')
|
|
88
|
+
is_dubbed = False
|
|
89
|
+
anime_type = 'TV'
|
|
90
|
+
|
|
91
|
+
if status_div:
|
|
92
|
+
if status_div.find('div', class_='dub'):
|
|
93
|
+
is_dubbed = True
|
|
94
|
+
|
|
95
|
+
if status_div.find('div', class_='movie'):
|
|
96
|
+
anime_type = 'Movie'
|
|
97
|
+
elif status_div.find('div', class_='ona'):
|
|
98
|
+
anime_type = 'ONA'
|
|
99
|
+
|
|
100
|
+
media_search_manager.add_media({
|
|
101
|
+
'name': title,
|
|
102
|
+
'type': anime_type,
|
|
103
|
+
'DUB': is_dubbed,
|
|
104
|
+
'url': url
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
except Exception as e:
|
|
108
|
+
print(f"Error parsing a film entry: {e}")
|
|
109
|
+
|
|
110
|
+
# Return the length of media search manager
|
|
111
|
+
return media_search_manager.get_length()
|