warp-beacon 2.6.92__py3-none-any.whl → 2.6.94__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.
@@ -1,2 +1,2 @@
1
- __version__ = "2.6.92"
1
+ __version__ = "2.6.94"
2
2
 
@@ -61,8 +61,10 @@ class AccountSelector(object):
61
61
  def save_ig_sessions_id(self) -> None:
62
62
  try:
63
63
  with self.lock:
64
+ sessions = dict(self.ig_accounts_session_id)
65
+ logging.info("Saving sessions: %s", sessions)
64
66
  with open(f"{self.session_dir}/ig_sessions_client_id.json", "w+", encoding="utf-8") as f:
65
- f.write(json.dumps(dict(self.ig_accounts_session_id)))
67
+ json.dump(sessions, f, indent=2)
66
68
  except Exception as e:
67
69
  logging.warning("Failed to save session ig_session_client_id!")
68
70
  logging.exception(e)
@@ -76,7 +78,7 @@ class AccountSelector(object):
76
78
  data = json.loads(f.read())
77
79
  if data and isinstance(data, dict):
78
80
  for k, v in data.items():
79
- self.ig_accounts_session_id[k] = v
81
+ self.ig_accounts_session_id[int(k)] = v
80
82
  except Exception as e:
81
83
  logging.warning("Failed to read session ig_session_client_id!")
82
84
  logging.exception(e)
@@ -265,7 +267,7 @@ class AccountSelector(object):
265
267
 
266
268
  def get_ig_session_id(self) -> str:
267
269
  with self.lock:
268
- idx = self.account_index[self.current_module_name].value
270
+ idx = int(self.account_index[self.current_module_name].value)
269
271
  if idx not in self.ig_accounts_session_id:
270
272
  self.ig_accounts_session_id[idx] = str(uuid.uuid4())
271
273
  #else:
@@ -212,6 +212,8 @@ class InstagramScraper(ScraperAbstract):
212
212
  if self.cl.relogin_attempt == 0:
213
213
  try:
214
214
  relogin_success = self.cl.relogin()
215
+ if relogin_success:
216
+ self.safe_write_session()
215
217
  except Exception as exc:
216
218
  logging.warning("Relogin failed!", exc_info=exc)
217
219
  if not relogin_success:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: warp_beacon
3
- Version: 2.6.92
3
+ Version: 2.6.94
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
@@ -4,7 +4,7 @@ var/warp_beacon/accounts.json,sha256=OsXdncs6h88xrF_AP6_WDCK1waGBn9SR-uYdIeK37GM
4
4
  var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
5
5
  var/warp_beacon/proxies.json,sha256=VnjlQDXumOEq72ZFjbh6IqHS1TEHqn8HPYAZqWCeSIA,95
6
6
  warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
7
- warp_beacon/__version__.py,sha256=iF0yfOjg6hC-zQ-FNsup_Tq2SFmeBl1guz7DXouxZbU,24
7
+ warp_beacon/__version__.py,sha256=ZfKNAblMuBfQLCz84NWvHsSF5wi9P4B9FJjLcn7CC2Q,24
8
8
  warp_beacon/warp_beacon.py,sha256=ADCR30uGXIsDrt9WoiI9Ghu2QtWs0qZIK6x3pQKM_B4,1109
9
9
  warp_beacon/yt_auth.py,sha256=GUTKqYr_tzDC-07Lx_ahWXSag8EyLxXBUnQbDBIkEmk,6022
10
10
  warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,14 +24,14 @@ warp_beacon/scheduler/instagram_human.py,sha256=JF5K8jgdwW0ncpKsEAj2yWMP9Y40kKgC
24
24
  warp_beacon/scheduler/scheduler.py,sha256=Bf4sGXjX75Dox3q-yzUHhagtzUAj3hl5GzfnZya-_io,4995
25
25
  warp_beacon/scraper/__init__.py,sha256=k3M0X_m5f7b_DbBB3Ahk62ewEYr5AkqJL0PJXf0G4mI,20140
26
26
  warp_beacon/scraper/abstract.py,sha256=pWbaTu-gDZgi-iFjqMR_uGzPl5KLv-4gTdJ9w6cD4sk,3802
27
- warp_beacon/scraper/account_selector.py,sha256=hl3tvX0FtDbEbSXphUXl7eWTKGFbHJOxqjPcwZZ-n6A,9980
27
+ warp_beacon/scraper/account_selector.py,sha256=vxIVesGPQKVtL3uSn5CFlZB1eAYowUN7lTeiGUFmtDk,10067
28
28
  warp_beacon/scraper/exceptions.py,sha256=EKwoF0oH2xZWbNU-v8DOaWK5skKwa3s1yTIBdlcfMpc,1452
29
29
  warp_beacon/scraper/fail_handler.py,sha256=zcPK3ZVEsu6JmHYcWP7L3naTRK3gWFVRkpP84VBOtJs,964
30
30
  warp_beacon/scraper/link_resolver.py,sha256=Rc9ZuMyOo3iPywDHwjngy-WRQ2SXhJwxcg-5ripx7tM,2447
31
31
  warp_beacon/scraper/utils.py,sha256=Kk_lDmdJiCSaHmOV80OFK05O1wRL2H0agH98JiO8dyg,1268
32
32
  warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  warp_beacon/scraper/instagram/captcha.py,sha256=9UYziuqB3Tsat_ET6ex-cnZDbi6yCnsXHSpmE8MuUHk,4651
34
- warp_beacon/scraper/instagram/instagram.py,sha256=s3Ef7isc38GOazeY2sWH3DSNHyTiENJwgpy_yYAsUVI,17584
34
+ warp_beacon/scraper/instagram/instagram.py,sha256=zGso9IuGv54ccdcnqxSB3tv3WOWPwTaTOvou_Fru4zw,17643
35
35
  warp_beacon/scraper/instagram/wb_instagrapi.py,sha256=OECHz1eK6J5bfw2H84CdywwxBNegkNb_UhDr0MtNtZ4,5237
36
36
  warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  warp_beacon/scraper/youtube/abstract.py,sha256=0ub4O8kNBzcrYCbMaNoNQzwE5vBdpNcSYNtxT-cBXe4,15024
@@ -52,9 +52,9 @@ warp_beacon/telegram/progress_file_reader.py,sha256=e3equyNKlKs764AD-iE9QRsh3YDH
52
52
  warp_beacon/telegram/types.py,sha256=Kvdng6uCF1HRoqQgGW1ZYYPJoVuYkFb-LDvMBbW5Hjk,89
53
53
  warp_beacon/telegram/utils.py,sha256=1Lq67aRylVJzbwSyvAgjPAGjJZFATkICvAj3TJGuJiM,4635
54
54
  warp_beacon/uploader/__init__.py,sha256=j3qcuKhpchseZLGzSsSiogqe6WdMbkK8d3I-ConhNRs,5687
55
- warp_beacon-2.6.92.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
- warp_beacon-2.6.92.dist-info/METADATA,sha256=kQXb1S8rQqK5wWk-GmexISkl7nCmP0pz02du0C_8JN0,22736
57
- warp_beacon-2.6.92.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
58
- warp_beacon-2.6.92.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
- warp_beacon-2.6.92.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
- warp_beacon-2.6.92.dist-info/RECORD,,
55
+ warp_beacon-2.6.94.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ warp_beacon-2.6.94.dist-info/METADATA,sha256=oKkw0YPjUL-k_xHdB4lvjeNKJsflUhwujeIO9Og3sqs,22736
57
+ warp_beacon-2.6.94.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
58
+ warp_beacon-2.6.94.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
59
+ warp_beacon-2.6.94.dist-info/top_level.txt,sha256=5YQRN46STNg81V_3jdzZ6bftkMxhe1hTPSFvJugDu84,1405
60
+ warp_beacon-2.6.94.dist-info/RECORD,,