warp-beacon 2.6.11__tar.gz → 2.6.13__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.
- {warp_beacon-2.6.11/warp_beacon.egg-info → warp_beacon-2.6.13}/PKG-INFO +1 -1
- warp_beacon-2.6.13/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/jobs/download_job.py +4 -6
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/__init__.py +6 -3
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/youtube/youtube.py +5 -5
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/warp_beacon.py +2 -2
- {warp_beacon-2.6.11 → warp_beacon-2.6.13/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.6.11/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/LICENSE +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/MANIFEST.in +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/README.md +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/assets/placeholder.gif +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/etc/.gitignore +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/etc/accounts.json +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/etc/proxies.json +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/pyproject.toml +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/setup.cfg +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/setup.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scheduler/instagram_human.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/instagram/captcha.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon/yt_auth.py +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.6.11 → warp_beacon-2.6.13}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -1,16 +1,14 @@
|
|
1
|
-
from typing import TypedDict
|
1
|
+
#from typing import TypedDict
|
2
2
|
from typing_extensions import Unpack
|
3
3
|
|
4
4
|
from warp_beacon.jobs.upload_job import UploadJob
|
5
5
|
from warp_beacon.jobs.abstract import AbstractJob, JobSettings
|
6
6
|
|
7
|
-
import logging
|
7
|
+
#import logging
|
8
8
|
|
9
9
|
class DownloadJob(AbstractJob):
|
10
10
|
def __init__(self, **kwargs: Unpack[JobSettings]) -> None:
|
11
11
|
super(DownloadJob, self).__init__(**kwargs)
|
12
|
-
def __del__(self) -> None:
|
13
|
-
pass
|
14
12
|
|
15
13
|
@staticmethod
|
16
14
|
def build(**kwargs: Unpack[JobSettings]) -> "DownloadJob":
|
@@ -20,7 +18,7 @@ class DownloadJob(AbstractJob):
|
|
20
18
|
d = self.to_dict()
|
21
19
|
d.update(kwargs)
|
22
20
|
if "media_collection" in d:
|
23
|
-
for index,
|
24
|
-
for k,
|
21
|
+
for index, _ in enumerate(d["media_collection"]):
|
22
|
+
for k, _ in enumerate(d["media_collection"][index]):
|
25
23
|
d["media_collection"][index][k] = UploadJob.build(**d["media_collection"][index][k])
|
26
24
|
return UploadJob.build(**d)
|
@@ -29,17 +29,20 @@ PROXY_FILE = os.environ.get("PROXY_FILE", default="/var/warp_beacon/proxies.json
|
|
29
29
|
class AsyncDownloader(object):
|
30
30
|
TG_FILE_LIMIT = 2147483648 # 2 GiB
|
31
31
|
__JOE_BIDEN_WAKEUP = None
|
32
|
-
workers =
|
32
|
+
workers = None
|
33
33
|
allow_loop = None
|
34
|
-
job_queue =
|
34
|
+
job_queue = None
|
35
35
|
uploader = None
|
36
36
|
workers_count = 0
|
37
|
-
auth_event =
|
37
|
+
auth_event = None
|
38
38
|
manager = None
|
39
39
|
acc_selector = None
|
40
40
|
scheduler = None
|
41
41
|
|
42
42
|
def __init__(self, uploader: AsyncUploader, workers_count: int) -> None:
|
43
|
+
self.workers = []
|
44
|
+
self.job_queue = multiprocessing.Queue()
|
45
|
+
self.auth_event = multiprocessing.Event()
|
43
46
|
self.manager = multiprocessing.Manager()
|
44
47
|
self.allow_loop = self.manager.Value('i', 1)
|
45
48
|
self.acc_selector = AccountSelector(self.manager, ACC_FILE, PROXY_FILE)
|
@@ -168,8 +168,8 @@ class YoutubeScraper(YoutubeAbstract):
|
|
168
168
|
formats = info.get('formats', [])
|
169
169
|
|
170
170
|
dl_format = {}
|
171
|
-
for f in sorted(formats, key=lambda x: (x.get('height') or 0), reverse=True):
|
172
|
-
if f.get('vcodec') != 'none' and f.get('acodec') != 'none' and f.get('ext') == 'mp4':
|
171
|
+
for f in sorted(formats, key=lambda x: (x.get('height', 0) or 0), reverse=True):
|
172
|
+
if f.get('vcodec', '') != 'none' and f.get('acodec', '') != 'none' and f.get('ext', '') == 'mp4':
|
173
173
|
dl_format = f
|
174
174
|
break
|
175
175
|
|
@@ -177,9 +177,9 @@ class YoutubeScraper(YoutubeAbstract):
|
|
177
177
|
if filesize:
|
178
178
|
if filesize > 2147483648: # 2 GiB
|
179
179
|
logging.warning("Max resolution exceeding TG limits")
|
180
|
-
for f in sorted(formats, key=lambda x: (x.get('height') or 0), reverse=True):
|
181
|
-
if (f.get('vcodec') != 'none' and f.get('acodec') != 'none'
|
182
|
-
and (f.get('height') or 0) <= 720 and f.get('ext') == 'mp4'):
|
180
|
+
for f in sorted(formats, key=lambda x: (x.get('height', 0) or 0), reverse=True):
|
181
|
+
if (f.get('vcodec', '') != 'none' and f.get('acodec', '') != 'none'
|
182
|
+
and (f.get('height', 0) or 0) <= 720 and f.get('ext', '') == 'mp4'):
|
183
183
|
alt_filesize = f.get('filesize', 0) or f.get('filesize_approx', 0)
|
184
184
|
if alt_filesize: #and alt_filesize <= max_size_bytes:
|
185
185
|
dl_format = f
|
@@ -2,7 +2,7 @@ import os
|
|
2
2
|
|
3
3
|
from warp_beacon.telegram.bot import Bot
|
4
4
|
|
5
|
-
import logging
|
5
|
+
#import logging
|
6
6
|
|
7
7
|
def main() -> None:
|
8
8
|
bot = Bot(
|
@@ -11,4 +11,4 @@ def main() -> None:
|
|
11
11
|
tg_api_id=os.environ.get("TG_API_ID", default=None),
|
12
12
|
tg_api_hash=os.environ.get("TG_API_HASH", default=None)
|
13
13
|
)
|
14
|
-
bot.start()
|
14
|
+
bot.start()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|