TelegramTelethonScraper: Using the username is fine.

This commit is contained in:
Logan Williams
2022-03-31 16:50:20 +02:00
parent 94cf6c3d84
commit 16aad4ef2c

View File

@@ -115,12 +115,6 @@ class TelegramTelethonScraper(Scraper):
phone = os.environ['TELEGRAM_PHONE']
with TelegramClient(phone, api_id, api_hash) as client:
try:
client.get_entity(channel.platform_id)
username = channel.platform_id
except:
logger.info(f"Channel {username} not encountered before")
for post in client.iter_messages(username):
post_url = f'{channel.url}/{post.id}'