[+] Channel data

This commit is contained in:
2025-03-14 15:26:22 -04:00
parent 2756a23e16
commit dca7b0e2fe
215 changed files with 32531 additions and 3 deletions
+6 -3
View File
@@ -41,9 +41,12 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
def channel_html(channel: str):
if (channels_dir / f"{channel}.html").exists():
return (channels_dir / f"{channel}.html").read_text()
return requests.get(f"https://t.me/{channel}").text
ouf = (channels_dir / f"{channel}.html")
if ouf.exists():
return ouf.read_text()
t = requests.get(f"https://t.me/{channel}").text
ouf.write_text(t)
return t
async def plant(update: Update, context: ContextTypes.DEFAULT_TYPE):