mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-12 21:38:33 +03:00
TelegramTelethonScraper: Using the username is fine.
This commit is contained in:
@@ -115,12 +115,6 @@ class TelegramTelethonScraper(Scraper):
|
|||||||
phone = os.environ['TELEGRAM_PHONE']
|
phone = os.environ['TELEGRAM_PHONE']
|
||||||
|
|
||||||
with TelegramClient(phone, api_id, api_hash) as client:
|
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):
|
for post in client.iter_messages(username):
|
||||||
post_url = f'{channel.url}/{post.id}'
|
post_url = f'{channel.url}/{post.id}'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user