A
A
Andrey Prenrek2022-01-23 21:26:16
Parsing
Andrey Prenrek, 2022-01-23 21:26:16

How to scrape users from comments on a Telethon post?

I sapred all the posts from the channel via GetHistoryRequests
and got the posts, here is one of them:

{'_': 'Message', 'id': 46, 'peer_id': {'_': 'PeerChannel', 'channel_id': 1760815202}, 'date': datetime.datetime(2021, 12, 6, 13, 10, 24, tzinfo=datetime.timezone.utc), 'message': '‼️ Аирдроп монет от chumbivalley‼️\n\nДля участия нужно:\n◾️зайти в их ТГ бота;\n◾️выполнить пару заданий.\n\n❗️В случае удачи мы получим 2500$❗️\n\nАбузим, потому что победных мест много, а приз в случае победы большой.', 'out': False, 'mentioned': False, 'media_unread': False, 'silent': False, 'post': True, 'from_scheduled': False, 'legacy': False, 'edit_hide': True, 'pinned': False, 'from_id': None, 'fwd_from': None, 'via_bot_id': None, 'reply_to': None, 'media': {'_': 'MessageMediaPhoto', 'photo': {'_': 'Photo', 'id': 5291839668398177233, 'access_hash': -5715473157232181177, 'file_reference': b'\x02h\xf3\xe8b\x00\x00\x00.a\xed\x8f\t\xe7\xecr\x89+\\\xaaF\xefI\x12\x85\xc4H\xed`', 'date': datetime.datetime(2021, 12, 6, 12, 8, 44, tzinfo=datetime.timezone.utc), 'sizes': [{'_': 'PhotoStrippedSize', 'type': 'i', 'bytes': b'\x01$(\xce\[email protected]\xf1\x91\x91H\x91\xee\x19\xe8+RkD\xc0c\xf3\x11\xc7Z\xceU3\xdc\x81\x08\x0b\x93\xc7\xb5+\x89\xc6\xc2yc\xbe\x7f*F]\x83=kH\xd8~\xef\x0b3o\x1c\xf3\xd2\xb3\x98\x15\x9f\x13\x0e\x8d\xf3\nJJ[\x07+[\x8c\x00\xb1\xc2\x82O\xa0\xa2\xb5"\xb7\x892B\x8d\xdd\xf9\xa2\xb4I\x8a\xe9\x13NB0$\x0c(&\xb3-\xa5X/\x03\xb1\x05A \x91D\xf72\xca\x0ex\x07\xad84J8h\x8e=c>\xd5\x95\xb4)\xbb\xech\xfd\xa2\xdds\'\x9c\xb8>\xff\x00\xd2\xb2.$\xf3\xa7y1\x8d\xc6\xa4-\x19Lf!\xc7\xf7\x0ei\xc6H\xceA\[email protected]#\xa8\x8c\xd2\x8cyF\xdd\xcb\xf1\xe0\xae\xe0\x07\xcd\xd4\xd1Y\xf1^\xb4q\x04\xda\x0e;\xd1[\xdd\x19Y\x91\x06+\xc8\xeb\xd3\xf4\xa4\xf3_;w~\x94QP\x86\x80J\xf9\xc6x\xe9\xd0zS\xfc\xc6\x1d\xff\x00J(\xa6Q\x0b1f\xc9\xefE\x14P#'}, {'_': 'PhotoSize', 'type': 'm', 'w': 320, 'h': 289, 'size': 28572}, {'_': 'PhotoSize', 'type': 'x', 'w': 800, 'h': 723, 'size': 105904}, {'_': 'PhotoSizeProgressive', 'type': 'y', 'w': 1200, 'h': 1085, 'sizes': [14129, 32250, 49704, 67347, 106243]}], 'dc_id': 2, 'has_stickers': False, 'video_sizes': []}, 'ttl_seconds': None}, 'reply_markup': None, 'entities': [{'_': 'MessageEntityTextUrl', 'offset': 20, 'length': 12, 'url': 'https://chumbivalley.com/'}, {'_': 'MessageEntityTextUrl', 'offset': 68, 'length': 2, 'url': 'https://t.me/CHUMBIVALLEY_Bot?start=r00975731780'}], 'views': 1415, 'forwards': 2, 'replies': {'_': 'MessageReplies', 'replies': 2, 'replies_pts': 1413, 'comments': True, 'recent_repliers': [{'_': 'PeerUser', 'user_id': 772811561}, {'_': 'PeerUser', 'user_id': 1906119245}], 'channel_id': 1792299473, 'max_id': 864, 'read_max_id': None}, 'edit_date': datetime.datetime(2021, 12, 6, 13, 10, 27, tzinfo=datetime.timezone.utc), 'post_author': None, 'grouped_id': None, 'restriction_reason': [], 'ttl_period': None}

But there are not all users who wrote comments, how can I ask them all?
here are the users I got 'recent_repliers': [{'_': 'PeerUser', 'user_id': 772811561}, {'_': 'PeerUser', 'user_id': 1906119245}] but there are more, 16 users
Or there are some realties method that shows all the information about the post in the channel?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question