yeref 0.29.18__py3-none-any.whl → 0.29.19__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.
yeref/yeref.py
CHANGED
@@ -13732,6 +13732,63 @@ async def edit_simple2(bot, chat_id, user_id, entity_id, post_id, message_id, cu
|
|
13732
13732
|
|
13733
13733
|
|
13734
13734
|
# region fun
|
13735
|
+
async def is_reason(user_id, user_username, user_full_name, ENT_CBAN):
|
13736
|
+
result = None
|
13737
|
+
try:
|
13738
|
+
new_, nousername_, cas_, symbols_, zalgo_ = list(ENT_CBAN)
|
13739
|
+
|
13740
|
+
if nousername_ == '☑' and not user_username:
|
13741
|
+
result = 'no @username'
|
13742
|
+
return
|
13743
|
+
if new_ == '☑' and user_id > old_tid:
|
13744
|
+
result = 'new id'
|
13745
|
+
return
|
13746
|
+
if cas_ == '☑':
|
13747
|
+
headers = {
|
13748
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
13749
|
+
"(KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
13750
|
+
"Accept": "application/json",
|
13751
|
+
"Accept-Language": "en;q=0.9",
|
13752
|
+
"Referer": "https://cas.chat/",
|
13753
|
+
}
|
13754
|
+
async with httpx.AsyncClient(http2=True, headers=headers, timeout=10) as client:
|
13755
|
+
url = f"https://api.cas.chat/check?user_id={user_id}"
|
13756
|
+
resp = await client.get(url)
|
13757
|
+
|
13758
|
+
print(f"? JSON: {url}")
|
13759
|
+
if resp.status_code == 200 and resp.headers.get("Content-Type", "").startswith("application/json"):
|
13760
|
+
data = resp.json()
|
13761
|
+
|
13762
|
+
print(f"? JSON: {data}")
|
13763
|
+
if data.get("ok") is True:
|
13764
|
+
print(f"✅ JSON: {data}")
|
13765
|
+
result = f"cas: {url}"
|
13766
|
+
return
|
13767
|
+
if zalgo_ == '☑':
|
13768
|
+
# '͞'
|
13769
|
+
# arr_zalgo = list(map(chr, range(768, 879)))
|
13770
|
+
# if len([item for item in arr_zalgo if item in user_full_name]):
|
13771
|
+
if has_zalgo(user_full_name):
|
13772
|
+
result = f"zalgo symbols: {user_full_name}"
|
13773
|
+
return
|
13774
|
+
if symbols_ == '☑':
|
13775
|
+
# , 世 文 , ችግሩ (ethiop)
|
13776
|
+
# arr_arab_hier = list(map(chr, range(1536, 1791))) + list(map(chr, range(19968, 40959))) + list(
|
13777
|
+
# map(chr, range(4608, 4991)))
|
13778
|
+
# , 世 文 , ችግሩ (эфиопский)
|
13779
|
+
if has_non_european_glyph(user_full_name):
|
13780
|
+
result = f"arab/zh symbols: {user_full_name}"
|
13781
|
+
return
|
13782
|
+
except TelegramRetryAfter as e:
|
13783
|
+
logger.info(log_ % f"TelegramRetryAfter {e.retry_after}")
|
13784
|
+
await asyncio.sleep(e.retry_after + 1)
|
13785
|
+
except Exception as e:
|
13786
|
+
logger.info(log_ % str(e))
|
13787
|
+
await asyncio.sleep(round(random.uniform(0, 1), 2))
|
13788
|
+
finally:
|
13789
|
+
return result
|
13790
|
+
|
13791
|
+
|
13735
13792
|
def has_non_european_glyph(text):
|
13736
13793
|
if text.isascii(): return False
|
13737
13794
|
return bool(PAT.search(text))
|
@@ -0,0 +1,8 @@
|
|
1
|
+
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
+
yeref/l_.py,sha256=77XIr32jhB2IBUMnkrpI15VjfzAMSiTpTeahlaJnJKM,616779
|
3
|
+
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
+
yeref/yeref.py,sha256=KKDWmigRKLFfk_yM8Xj59p5N7vjY3ArtUeBKGzNV2K4,1059365
|
5
|
+
yeref-0.29.19.dist-info/METADATA,sha256=VgF7BW04Vhn6YETANB9T-xYbs7IdJXVaPRlwYRRy5HE,119
|
6
|
+
yeref-0.29.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.29.19.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.29.19.dist-info/RECORD,,
|
yeref-0.29.18.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
-
yeref/l_.py,sha256=77XIr32jhB2IBUMnkrpI15VjfzAMSiTpTeahlaJnJKM,616779
|
3
|
-
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
-
yeref/yeref.py,sha256=GHFis_RIastNKb1bHIuC6X7W43SWmk_PZMFvLKDJr6E,1056932
|
5
|
-
yeref-0.29.18.dist-info/METADATA,sha256=3RQbg2HFDOqb8n9ufwgao96rGg4qi5exK5QSX2UAeKQ,119
|
6
|
-
yeref-0.29.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.29.18.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.29.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|