warp-beacon 2.2.32__tar.gz → 2.2.34__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.
Files changed (54) hide show
  1. {warp_beacon-2.2.32/warp_beacon.egg-info → warp_beacon-2.2.34}/PKG-INFO +1 -1
  2. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/etc/accounts.json +13 -2
  3. warp_beacon-2.2.34/warp_beacon/__version__.py +2 -0
  4. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scheduler/scheduler.py +2 -2
  5. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/account_selector.py +2 -2
  6. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/youtube/abstract.py +5 -3
  7. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/telegram/bot.py +6 -2
  8. {warp_beacon-2.2.32 → warp_beacon-2.2.34/warp_beacon.egg-info}/PKG-INFO +1 -1
  9. warp_beacon-2.2.32/warp_beacon/__version__.py +0 -2
  10. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/LICENSE +0 -0
  11. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/MANIFEST.in +0 -0
  12. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/README.md +0 -0
  13. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/assets/placeholder.gif +0 -0
  14. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/etc/.gitignore +0 -0
  15. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/etc/warp_beacon.conf +0 -0
  16. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/etc/warp_beacon.service +0 -0
  17. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/pyproject.toml +0 -0
  18. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/setup.cfg +0 -0
  19. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/setup.py +0 -0
  20. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/__init__.py +0 -0
  21. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/compress/__init__.py +0 -0
  22. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/compress/video.py +0 -0
  23. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/jobs/__init__.py +0 -0
  24. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/jobs/abstract.py +0 -0
  25. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/jobs/download_job.py +0 -0
  26. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/jobs/types.py +0 -0
  27. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/jobs/upload_job.py +0 -0
  28. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/mediainfo/__init__.py +0 -0
  29. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/mediainfo/abstract.py +0 -0
  30. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/mediainfo/audio.py +0 -0
  31. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/mediainfo/silencer.py +0 -0
  32. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/mediainfo/video.py +0 -0
  33. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scheduler/__init__.py +0 -0
  34. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/__init__.py +0 -0
  35. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/abstract.py +0 -0
  36. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/exceptions.py +0 -0
  37. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/instagram/__init__.py +0 -0
  38. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/instagram/instagram.py +0 -0
  39. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/youtube/__init__.py +0 -0
  40. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/youtube/music.py +0 -0
  41. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/youtube/shorts.py +0 -0
  42. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/scraper/youtube/youtube.py +0 -0
  43. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/storage/__init__.py +0 -0
  44. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/telegram/__init__.py +0 -0
  45. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/telegram/handlers.py +0 -0
  46. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/telegram/placeholder_message.py +0 -0
  47. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/telegram/utils.py +0 -0
  48. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/uploader/__init__.py +0 -0
  49. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon/warp_beacon.py +0 -0
  50. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon.egg-info/SOURCES.txt +0 -0
  51. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon.egg-info/dependency_links.txt +0 -0
  52. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon.egg-info/entry_points.txt +0 -0
  53. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon.egg-info/requires.txt +0 -0
  54. {warp_beacon-2.2.32 → warp_beacon-2.2.34}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp_beacon
3
- Version: 2.2.32
3
+ Version: 2.2.34
4
4
  Summary: Telegram bot for expanding external media links
5
5
  Home-page: https://github.com/sb0y/warp_beacon
6
6
  Author: Andrey Bagrintsev
@@ -27,7 +27,8 @@
27
27
  "cpu": "exynos2100",
28
28
  "version_code": "493450264"
29
29
  }
30
- }
30
+ },
31
+ "account_admins": "@BelisariusCawl"
31
32
  },
32
33
  {
33
34
  "login": "ig_account1",
@@ -55,7 +56,17 @@
55
56
  "cpu": "exynos2100",
56
57
  "version_code": "493450264"
57
58
  }
58
- }
59
+ },
60
+ "account_admins": "@BelisariusCawl"
61
+ }
62
+ ],
63
+ "youtube":
64
+ [
65
+ {
66
+ "account_admins": "@BelisariusCawl"
67
+ },
68
+ {
69
+ "account_admins": "@Lazyteh"
59
70
  }
60
71
  ]
61
72
  }
@@ -0,0 +1,2 @@
1
+ __version__ = "2.2.34"
2
+
@@ -15,7 +15,7 @@ class IGScheduler(object):
15
15
  running = True
16
16
  thread = None
17
17
  event = None
18
- state = {"remaining": randrange(3600, 10800)}
18
+ state = {"remaining": randrange(6800, 20800)}
19
19
 
20
20
  def __init__(self, downloader: warp_beacon.scraper.AsyncDownloader) -> None:
21
21
  self.downloader = downloader
@@ -82,7 +82,7 @@ class IGScheduler(object):
82
82
  while self.running:
83
83
  try:
84
84
  if self.state["remaining"] <= 0:
85
- self.state["remaining"] = randrange(3600, 10800)
85
+ self.state["remaining"] = randrange(6800, 20800)
86
86
  logging.info("Next scheduler activity in '%s' seconds", self.state["remaining"])
87
87
 
88
88
  start_time = time.time()
@@ -45,7 +45,7 @@ class AccountSelector(object):
45
45
  self.accounts["youtube"] = []
46
46
  for f in os.listdir(self.session_dir):
47
47
  if "yt_session" in f and ".json" in f:
48
- match = re.search('\d+', f)
48
+ match = re.search(r'\d+', f)
49
49
  index = 0
50
50
  if match:
51
51
  index = int(match.group(0))
@@ -65,7 +65,7 @@ class AccountSelector(object):
65
65
  self.current_module_name = module_name
66
66
  if self.current is None:
67
67
  self.current = self.accounts[self.current_module_name][self.index.value]
68
- self.acc_pools[self.current_module_name] = next(islice(self.acc_pools[self.current_module_name], self.index.value, None))
68
+ #self.acc_pools[self.current_module_name] = next(islice(self.acc_pools[self.current_module_name], self.index.value, None))
69
69
 
70
70
  def next(self) -> dict:
71
71
  self.current = next(self.acc_pools[self.current_module_name])
@@ -10,10 +10,10 @@ import json
10
10
  import urllib
11
11
  import requests
12
12
  import http.client
13
- from PIL import Image, ImageOps
13
+ from PIL import Image
14
14
 
15
15
  from warp_beacon.scraper.abstract import ScraperAbstract
16
- from warp_beacon.mediainfo.abstract import MediaInfoAbstract
16
+ #from warp_beacon.mediainfo.abstract import MediaInfoAbstract
17
17
  from warp_beacon.scraper.exceptions import TimeOut, Unavailable, extract_exception_message
18
18
 
19
19
  from pytubefix import YouTube
@@ -50,6 +50,7 @@ def patched_fetch_bearer_token(self) -> None:
50
50
  f"Please open {verification_url} and input code `{user_code}`.\n\n"
51
51
  "Please select a Google account with verified age.\n"
52
52
  "This will allow you to avoid error the **AgeRestrictedError** when accessing some content.",
53
+ account_admins=self.wb_account.get("account_admins", None),
53
54
  yt_auth=True)
54
55
  self.auth_event.wait()
55
56
 
@@ -119,7 +120,7 @@ class YoutubeAbstract(ScraperAbstract):
119
120
 
120
121
  if aspect_ratio_height > 4:
121
122
  image = image.resize((image.size[0], image.size[1]+new_image.size[1]))
122
- height += new_image.size[1] - 5
123
+ #height += new_image.size[1] - 5
123
124
 
124
125
  paste_position = ((target_width - width) // 2, (target_height - height) // 2)
125
126
  new_image.paste(image, paste_position)
@@ -201,6 +202,7 @@ class YoutubeAbstract(ScraperAbstract):
201
202
  def build_yt(self, url: str) -> YouTube:
202
203
  InnerTube.send_message_to_admin_func = self.send_message_to_admin_func
203
204
  InnerTube.auth_event = self.auth_event
205
+ InnerTube.wb_account = self.account
204
206
  InnerTube.fetch_bearer_token = patched_fetch_bearer_token
205
207
  _default_clients["ANDROID"]["innertube_context"]["context"]["client"]["clientVersion"] = "19.08.35"
206
208
  _default_clients["ANDROID_MUSIC"] = _default_clients["ANDROID"]
@@ -118,9 +118,13 @@ class Bot(object):
118
118
 
119
119
  return 0
120
120
 
121
- async def send_text_to_admin(self, text: str, yt_auth: bool = False) -> list[int]:
121
+ async def send_text_to_admin(self, text: str, account_admins: str = None, yt_auth: bool = False) -> list[int]:
122
122
  try:
123
- admins = os.environ.get("TG_BOT_ADMINS_USERNAMES", None)
123
+ admins = None
124
+ if account_admins:
125
+ admins = account_admins
126
+ if not admins:
127
+ admins = os.environ.get("TG_BOT_ADMINS_USERNAMES", None)
124
128
  if not admins:
125
129
  raise ValueError("Configuration value `TG_BOT_ADMIN_USERNAME` is empty!")
126
130
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp_beacon
3
- Version: 2.2.32
3
+ Version: 2.2.34
4
4
  Summary: Telegram bot for expanding external media links
5
5
  Home-page: https://github.com/sb0y/warp_beacon
6
6
  Author: Andrey Bagrintsev
@@ -1,2 +0,0 @@
1
- __version__ = "2.2.32"
2
-
File without changes
File without changes
File without changes
File without changes
File without changes