StreamingCommunity 2.6.1__py3-none-any.whl → 2.8.0__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/ddl.py +4 -4
- StreamingCommunity/Api/Player/maxstream.py +10 -16
- StreamingCommunity/Api/Player/supervideo.py +9 -35
- StreamingCommunity/Api/Player/vixcloud.py +18 -92
- StreamingCommunity/Api/Site/1337xx/__init__.py +8 -1
- StreamingCommunity/Api/Site/1337xx/site.py +16 -15
- StreamingCommunity/Api/Site/1337xx/title.py +7 -5
- StreamingCommunity/Api/Site/animeunity/__init__.py +9 -2
- StreamingCommunity/Api/Site/animeunity/film_serie.py +12 -5
- StreamingCommunity/Api/Site/animeunity/site.py +14 -10
- StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +9 -10
- StreamingCommunity/Api/Site/cb01new/__init__.py +8 -1
- StreamingCommunity/Api/Site/cb01new/film.py +7 -1
- StreamingCommunity/Api/Site/cb01new/site.py +24 -15
- StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +9 -2
- StreamingCommunity/Api/Site/ddlstreamitaly/series.py +7 -1
- StreamingCommunity/Api/Site/ddlstreamitaly/site.py +16 -15
- StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +3 -3
- StreamingCommunity/Api/Site/guardaserie/__init__.py +9 -2
- StreamingCommunity/Api/Site/guardaserie/series.py +9 -1
- StreamingCommunity/Api/Site/guardaserie/site.py +23 -22
- StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +5 -4
- StreamingCommunity/Api/Site/mostraguarda/__init__.py +6 -2
- StreamingCommunity/Api/Site/mostraguarda/film.py +10 -6
- StreamingCommunity/Api/Site/streamingcommunity/__init__.py +9 -2
- StreamingCommunity/Api/Site/streamingcommunity/film.py +9 -2
- StreamingCommunity/Api/Site/streamingcommunity/series.py +15 -6
- StreamingCommunity/Api/Site/streamingcommunity/site.py +16 -14
- StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +10 -11
- StreamingCommunity/Api/Template/Util/__init__.py +0 -1
- StreamingCommunity/Api/Template/Util/get_domain.py +31 -134
- StreamingCommunity/Api/Template/Util/manage_ep.py +10 -5
- StreamingCommunity/Api/Template/config_loader.py +14 -10
- StreamingCommunity/Api/Template/site.py +3 -6
- StreamingCommunity/Lib/Downloader/HLS/downloader.py +12 -15
- StreamingCommunity/Lib/Downloader/HLS/segments.py +14 -34
- StreamingCommunity/Lib/Downloader/MP4/downloader.py +14 -11
- StreamingCommunity/Lib/Downloader/TOR/downloader.py +109 -101
- StreamingCommunity/Lib/FFmpeg/__init__.py +1 -1
- StreamingCommunity/Lib/FFmpeg/capture.py +10 -12
- StreamingCommunity/Lib/FFmpeg/command.py +15 -14
- StreamingCommunity/Lib/FFmpeg/util.py +9 -38
- StreamingCommunity/Lib/M3U8/decryptor.py +72 -146
- StreamingCommunity/Lib/M3U8/estimator.py +8 -16
- StreamingCommunity/Lib/M3U8/parser.py +1 -17
- StreamingCommunity/Lib/M3U8/url_fixer.py +1 -4
- StreamingCommunity/Lib/TMBD/__init__.py +2 -0
- StreamingCommunity/Lib/TMBD/obj_tmbd.py +3 -17
- StreamingCommunity/Lib/TMBD/tmdb.py +4 -9
- StreamingCommunity/TelegramHelp/telegram_bot.py +50 -50
- StreamingCommunity/Upload/update.py +6 -5
- StreamingCommunity/Upload/version.py +1 -1
- StreamingCommunity/Util/color.py +1 -1
- StreamingCommunity/Util/config_json.py +435 -0
- StreamingCommunity/Util/headers.py +7 -36
- StreamingCommunity/Util/logger.py +72 -42
- StreamingCommunity/Util/message.py +8 -3
- StreamingCommunity/Util/os.py +41 -93
- StreamingCommunity/Util/table.py +8 -17
- StreamingCommunity/run.py +39 -43
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/METADATA +203 -114
- StreamingCommunity-2.8.0.dist-info/RECORD +75 -0
- StreamingCommunity/Api/Site/ilcorsaronero/__init__.py +0 -53
- StreamingCommunity/Api/Site/ilcorsaronero/site.py +0 -64
- StreamingCommunity/Api/Site/ilcorsaronero/title.py +0 -42
- StreamingCommunity/Api/Site/ilcorsaronero/util/ilCorsarScraper.py +0 -149
- StreamingCommunity/Api/Template/Util/recall_search.py +0 -37
- StreamingCommunity/Lib/Downloader/HLS/proxyes.py +0 -110
- StreamingCommunity/Util/_jsonConfig.py +0 -241
- StreamingCommunity/Util/call_stack.py +0 -42
- StreamingCommunity/Util/console.py +0 -12
- StreamingCommunity-2.6.1.dist-info/RECORD +0 -83
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/LICENSE +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/WHEEL +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/entry_points.txt +0 -0
- {StreamingCommunity-2.6.1.dist-info → StreamingCommunity-2.8.0.dist-info}/top_level.txt +0 -0
|
@@ -113,7 +113,7 @@ class TelegramRequestManager:
|
|
|
113
113
|
return False
|
|
114
114
|
|
|
115
115
|
except (FileNotFoundError, json.JSONDecodeError) as e:
|
|
116
|
-
print(f"
|
|
116
|
+
print(f" save_response - errore: {e}")
|
|
117
117
|
return False
|
|
118
118
|
|
|
119
119
|
def get_response(self) -> Optional[str]:
|
|
@@ -142,7 +142,7 @@ class TelegramRequestManager:
|
|
|
142
142
|
return True
|
|
143
143
|
|
|
144
144
|
except Exception as e:
|
|
145
|
-
print(f"
|
|
145
|
+
print(f" clear_file - errore: {e}")
|
|
146
146
|
return False
|
|
147
147
|
|
|
148
148
|
# Funzione per caricare variabili da un file .env
|
|
@@ -230,20 +230,20 @@ class TelegramBot:
|
|
|
230
230
|
["screen", "-S", script["screen_id"], "-X", "quit"]
|
|
231
231
|
)
|
|
232
232
|
print(
|
|
233
|
-
f"
|
|
233
|
+
f" La sessione screen con ID {script['screen_id']} è stata fermata automaticamente."
|
|
234
234
|
)
|
|
235
235
|
except subprocess.CalledProcessError:
|
|
236
236
|
print(
|
|
237
|
-
f"
|
|
237
|
+
f" Impossibile fermare la sessione screen con ID {script['screen_id']}."
|
|
238
238
|
)
|
|
239
239
|
print(
|
|
240
|
-
f"
|
|
240
|
+
f" Lo script con ID {script['screen_id']} ha superato i 10 minuti e verrà rimosso."
|
|
241
241
|
)
|
|
242
242
|
else:
|
|
243
243
|
scripts_data_to_save.append(script)
|
|
244
244
|
else:
|
|
245
245
|
print(
|
|
246
|
-
f"
|
|
246
|
+
f" La sessione screen con ID {script['screen_id']} non esiste più e verrà rimossa."
|
|
247
247
|
)
|
|
248
248
|
|
|
249
249
|
# Salva la lista aggiornata, senza gli script scaduti o le screen non esistenti
|
|
@@ -305,8 +305,8 @@ class TelegramBot:
|
|
|
305
305
|
|
|
306
306
|
def handle_get_id(self, message):
|
|
307
307
|
if not self.is_authorized(message.from_user.id):
|
|
308
|
-
print(f"
|
|
309
|
-
self.bot.send_message(message.chat.id, "
|
|
308
|
+
print(f" Non sei autorizzato.")
|
|
309
|
+
self.bot.send_message(message.chat.id, " Non sei autorizzato.")
|
|
310
310
|
return
|
|
311
311
|
|
|
312
312
|
print(f"Il tuo ID utente è: `{message.from_user.id}`")
|
|
@@ -318,8 +318,8 @@ class TelegramBot:
|
|
|
318
318
|
|
|
319
319
|
def handle_start_script(self, message):
|
|
320
320
|
if not self.is_authorized(message.from_user.id):
|
|
321
|
-
print(f"
|
|
322
|
-
self.bot.send_message(message.chat.id, "
|
|
321
|
+
print(f" Non sei autorizzato. {message.from_user.id}")
|
|
322
|
+
self.bot.send_message(message.chat.id, " Non sei autorizzato.")
|
|
323
323
|
return
|
|
324
324
|
|
|
325
325
|
screen_id = str(uuid.uuid4())[:8]
|
|
@@ -335,10 +335,10 @@ class TelegramBot:
|
|
|
335
335
|
"utf-8"
|
|
336
336
|
)
|
|
337
337
|
if screen_id in existing_screens:
|
|
338
|
-
print(f"
|
|
338
|
+
print(f" Lo script con ID {screen_id} è già in esecuzione.")
|
|
339
339
|
self.bot.send_message(
|
|
340
340
|
message.chat.id,
|
|
341
|
-
f"
|
|
341
|
+
f" Lo script con ID {screen_id} è già in esecuzione.",
|
|
342
342
|
)
|
|
343
343
|
return
|
|
344
344
|
except subprocess.CalledProcessError:
|
|
@@ -384,8 +384,8 @@ class TelegramBot:
|
|
|
384
384
|
|
|
385
385
|
def handle_list_scripts(self, message):
|
|
386
386
|
if not self.is_authorized(message.from_user.id):
|
|
387
|
-
print(f"
|
|
388
|
-
self.bot.send_message(message.chat.id, "
|
|
387
|
+
print(f" Non sei autorizzato.")
|
|
388
|
+
self.bot.send_message(message.chat.id, " Non sei autorizzato.")
|
|
389
389
|
return
|
|
390
390
|
|
|
391
391
|
try:
|
|
@@ -395,12 +395,12 @@ class TelegramBot:
|
|
|
395
395
|
scripts_data = []
|
|
396
396
|
|
|
397
397
|
if not scripts_data:
|
|
398
|
-
print(f"
|
|
399
|
-
self.bot.send_message(message.chat.id, "
|
|
398
|
+
print(f" Nessuno script registrato.")
|
|
399
|
+
self.bot.send_message(message.chat.id, " Nessuno script registrato.")
|
|
400
400
|
return
|
|
401
401
|
|
|
402
402
|
current_time = time.time()
|
|
403
|
-
msg = ["
|
|
403
|
+
msg = [" **Script Registrati:**\n"]
|
|
404
404
|
|
|
405
405
|
for script in scripts_data:
|
|
406
406
|
# Calcola la durata
|
|
@@ -414,12 +414,12 @@ class TelegramBot:
|
|
|
414
414
|
duration_str = f"{int(hours)}h {int(minutes)}m {int(seconds)}s"
|
|
415
415
|
|
|
416
416
|
# Icona stato
|
|
417
|
-
status_icons = {"running": "
|
|
417
|
+
status_icons = {"running": "", "stopped": "", "completed": ""}
|
|
418
418
|
|
|
419
419
|
# Costruisci riga
|
|
420
420
|
line = (
|
|
421
421
|
f"• ID: `{script['screen_id']}`\n"
|
|
422
|
-
f"• Stato: {status_icons.get(script['status'], '
|
|
422
|
+
f"• Stato: {status_icons.get(script['status'], '')}\n"
|
|
423
423
|
f"• Stop: `/stop {script['screen_id']}`\n"
|
|
424
424
|
f"• Screen: `/screen {script['screen_id']}`\n"
|
|
425
425
|
f"• Durata: {duration_str}\n"
|
|
@@ -437,8 +437,8 @@ class TelegramBot:
|
|
|
437
437
|
|
|
438
438
|
def handle_stop_script(self, message):
|
|
439
439
|
if not self.is_authorized(message.from_user.id):
|
|
440
|
-
print(f"
|
|
441
|
-
self.bot.send_message(message.chat.id, "
|
|
440
|
+
print(f" Non sei autorizzato.")
|
|
441
|
+
self.bot.send_message(message.chat.id, " Non sei autorizzato.")
|
|
442
442
|
return
|
|
443
443
|
|
|
444
444
|
parts = message.text.split()
|
|
@@ -452,15 +452,15 @@ class TelegramBot:
|
|
|
452
452
|
running_scripts = [s for s in scripts_data if s["status"] == "running"]
|
|
453
453
|
|
|
454
454
|
if not running_scripts:
|
|
455
|
-
print(f"
|
|
455
|
+
print(f" Nessuno script attivo da fermare.")
|
|
456
456
|
self.bot.send_message(
|
|
457
|
-
message.chat.id, "
|
|
457
|
+
message.chat.id, " Nessuno script attivo da fermare."
|
|
458
458
|
)
|
|
459
459
|
return
|
|
460
460
|
|
|
461
|
-
msg = "
|
|
461
|
+
msg = " **Script Attivi:**\n"
|
|
462
462
|
for script in running_scripts:
|
|
463
|
-
msg += f"
|
|
463
|
+
msg += f" `/stop {script['screen_id']}` per fermarlo\n"
|
|
464
464
|
|
|
465
465
|
print(f"{msg}")
|
|
466
466
|
self.bot.send_message(message.chat.id, msg, parse_mode="Markdown")
|
|
@@ -481,10 +481,10 @@ class TelegramBot:
|
|
|
481
481
|
|
|
482
482
|
if len(new_scripts_data) == len(scripts_data):
|
|
483
483
|
# Nessun elemento rimosso, quindi ID non trovato
|
|
484
|
-
print(f"
|
|
484
|
+
print(f" Nessuno script attivo con ID `{screen_id}`.")
|
|
485
485
|
self.bot.send_message(
|
|
486
486
|
message.chat.id,
|
|
487
|
-
f"
|
|
487
|
+
f" Nessuno script attivo con ID `{screen_id}`.",
|
|
488
488
|
parse_mode="Markdown",
|
|
489
489
|
)
|
|
490
490
|
return
|
|
@@ -492,14 +492,14 @@ class TelegramBot:
|
|
|
492
492
|
# Terminare la sessione screen
|
|
493
493
|
try:
|
|
494
494
|
subprocess.check_output(["screen", "-S", screen_id, "-X", "quit"])
|
|
495
|
-
print(f"
|
|
495
|
+
print(f" La sessione screen con ID {screen_id} è stata fermata.")
|
|
496
496
|
except subprocess.CalledProcessError:
|
|
497
497
|
print(
|
|
498
|
-
f"
|
|
498
|
+
f" Impossibile fermare la sessione screen con ID `{screen_id}`."
|
|
499
499
|
)
|
|
500
500
|
self.bot.send_message(
|
|
501
501
|
message.chat.id,
|
|
502
|
-
f"
|
|
502
|
+
f" Impossibile fermare la sessione screen con ID `{screen_id}`.",
|
|
503
503
|
parse_mode="Markdown",
|
|
504
504
|
)
|
|
505
505
|
return
|
|
@@ -508,27 +508,27 @@ class TelegramBot:
|
|
|
508
508
|
with open("../../scripts.json", "w") as f:
|
|
509
509
|
json.dump(new_scripts_data, f, indent=4)
|
|
510
510
|
|
|
511
|
-
print(f"
|
|
511
|
+
print(f" Script `{screen_id}` terminato con successo!")
|
|
512
512
|
self.bot.send_message(
|
|
513
513
|
message.chat.id,
|
|
514
|
-
f"
|
|
514
|
+
f" Script `{screen_id}` terminato con successo!",
|
|
515
515
|
parse_mode="Markdown",
|
|
516
516
|
)
|
|
517
517
|
|
|
518
518
|
def handle_response(self, message):
|
|
519
519
|
text = message.text
|
|
520
520
|
if self.request_manager.save_response(text):
|
|
521
|
-
print(f"
|
|
521
|
+
print(f" Risposta salvata correttamente per il tipo {text}")
|
|
522
522
|
else:
|
|
523
|
-
print("
|
|
524
|
-
self.bot.reply_to(message, "
|
|
523
|
+
print(" Nessuna richiesta attiva.")
|
|
524
|
+
self.bot.reply_to(message, " Nessuna richiesta attiva.")
|
|
525
525
|
|
|
526
526
|
def handle_screen_status(self, message):
|
|
527
527
|
command_parts = message.text.split()
|
|
528
528
|
if len(command_parts) < 2:
|
|
529
|
-
print(f"
|
|
529
|
+
print(f" ID mancante nel comando. Usa: /screen <ID>")
|
|
530
530
|
self.bot.send_message(
|
|
531
|
-
message.chat.id, "
|
|
531
|
+
message.chat.id, " ID mancante nel comando. Usa: /screen <ID>"
|
|
532
532
|
)
|
|
533
533
|
return
|
|
534
534
|
|
|
@@ -539,8 +539,8 @@ class TelegramBot:
|
|
|
539
539
|
# Verifica se lo screen con l'ID specificato esiste
|
|
540
540
|
existing_screens = subprocess.check_output(["screen", "-list"]).decode('utf-8')
|
|
541
541
|
if screen_id not in existing_screens:
|
|
542
|
-
print(f"
|
|
543
|
-
self.bot.send_message(message.chat.id, f"
|
|
542
|
+
print(f" La sessione screen con ID {screen_id} non esiste.")
|
|
543
|
+
self.bot.send_message(message.chat.id, f" La sessione screen con ID {screen_id} non esiste.")
|
|
544
544
|
return
|
|
545
545
|
|
|
546
546
|
# Cattura l'output della screen
|
|
@@ -549,17 +549,17 @@ class TelegramBot:
|
|
|
549
549
|
check=True,
|
|
550
550
|
)
|
|
551
551
|
except subprocess.CalledProcessError as e:
|
|
552
|
-
print(f"
|
|
552
|
+
print(f" Errore durante la cattura dell'output della screen: {e}")
|
|
553
553
|
self.bot.send_message(
|
|
554
554
|
message.chat.id,
|
|
555
|
-
f"
|
|
555
|
+
f" Errore durante la cattura dell'output della screen: {e}",
|
|
556
556
|
)
|
|
557
557
|
return
|
|
558
558
|
|
|
559
559
|
if not os.path.exists(temp_file):
|
|
560
|
-
print(f"
|
|
560
|
+
print(f" Impossibile catturare l'output della screen.")
|
|
561
561
|
self.bot.send_message(
|
|
562
|
-
message.chat.id, f"
|
|
562
|
+
message.chat.id, f" Impossibile catturare l'output della screen."
|
|
563
563
|
)
|
|
564
564
|
return
|
|
565
565
|
|
|
@@ -594,18 +594,18 @@ class TelegramBot:
|
|
|
594
594
|
cleaned_output = re.sub(r'segments\.py:\d+', '', cleaned_output)
|
|
595
595
|
|
|
596
596
|
# Invia l'output pulito
|
|
597
|
-
print(f"
|
|
597
|
+
print(f" Output della screen {screen_id}:\n{cleaned_output}")
|
|
598
598
|
self._send_long_message(
|
|
599
|
-
message.chat.id, f"
|
|
599
|
+
message.chat.id, f" Output della screen {screen_id}:\n{cleaned_output}"
|
|
600
600
|
)
|
|
601
601
|
|
|
602
602
|
except Exception as e:
|
|
603
603
|
print(
|
|
604
|
-
f"
|
|
604
|
+
f" Errore durante la lettura o l'invio dell'output della screen: {e}"
|
|
605
605
|
)
|
|
606
606
|
self.bot.send_message(
|
|
607
607
|
message.chat.id,
|
|
608
|
-
f"
|
|
608
|
+
f" Errore durante la lettura o l'invio dell'output della screen: {e}",
|
|
609
609
|
)
|
|
610
610
|
|
|
611
611
|
# Cancella il file temporaneo
|
|
@@ -665,14 +665,14 @@ class TelegramBot:
|
|
|
665
665
|
return response
|
|
666
666
|
time.sleep(1)
|
|
667
667
|
|
|
668
|
-
print(f"
|
|
668
|
+
print(f" Timeout: nessuna risposta ricevuta.")
|
|
669
669
|
for chat_id in self.authorized_users: # Manda a tutti gli ID autorizzati
|
|
670
|
-
self.bot.send_message(chat_id, "
|
|
670
|
+
self.bot.send_message(chat_id, " Timeout: nessuna risposta ricevuta.")
|
|
671
671
|
self.request_manager.clear_file()
|
|
672
672
|
return None
|
|
673
673
|
|
|
674
674
|
def run(self):
|
|
675
|
-
print("
|
|
675
|
+
print(" Avvio del bot...")
|
|
676
676
|
with open("../../scripts.json", "w") as f:
|
|
677
677
|
json.dump([], f)
|
|
678
678
|
self.bot.infinity_polling()
|
|
@@ -7,13 +7,13 @@ import time
|
|
|
7
7
|
|
|
8
8
|
# External library
|
|
9
9
|
import httpx
|
|
10
|
+
from rich.console import Console
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
# Internal utilities
|
|
13
14
|
from .version import __version__, __author__, __title__
|
|
14
|
-
from StreamingCommunity.Util.
|
|
15
|
-
from StreamingCommunity.Util.
|
|
16
|
-
from StreamingCommunity.Util.headers import get_headers
|
|
15
|
+
from StreamingCommunity.Util.config_json import config_manager
|
|
16
|
+
from StreamingCommunity.Util.headers import get_userAgent
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -22,6 +22,7 @@ if getattr(sys, 'frozen', False): # Modalità PyInstaller
|
|
|
22
22
|
base_path = os.path.join(sys._MEIPASS, "StreamingCommunity")
|
|
23
23
|
else:
|
|
24
24
|
base_path = os.path.dirname(__file__)
|
|
25
|
+
console = Console()
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def update():
|
|
@@ -31,14 +32,14 @@ def update():
|
|
|
31
32
|
try:
|
|
32
33
|
response_reposity = httpx.get(
|
|
33
34
|
url=f"https://api.github.com/repos/{__author__}/{__title__}",
|
|
34
|
-
headers={'user-agent':
|
|
35
|
+
headers={'user-agent': get_userAgent()},
|
|
35
36
|
timeout=config_manager.get_int("REQUESTS", "timeout"),
|
|
36
37
|
follow_redirects=True
|
|
37
38
|
).json()
|
|
38
39
|
|
|
39
40
|
response_releases = httpx.get(
|
|
40
41
|
url=f"https://api.github.com/repos/{__author__}/{__title__}/releases",
|
|
41
|
-
headers={'user-agent':
|
|
42
|
+
headers={'user-agent': get_userAgent()},
|
|
42
43
|
timeout=config_manager.get_int("REQUESTS", "timeout"),
|
|
43
44
|
follow_redirects=True
|
|
44
45
|
).json()
|
StreamingCommunity/Util/color.py
CHANGED