Load telegram chat history with Watir

0 votes
asked Sep 11, 2017 by joe-marion

I am writing my first webscraper in rails and I need to retrieve the chat history from a group I am a part of in Telegram.

I know telegram is written in React so I couldn't use mechanize so I decided to try Watir for now. I am able to have Watir login and see the group chats, but only the last 100 or so messages display unless you scroll up to display more of the history. So when I use

browser.element(class: "im_history_messages_peer").text.strip

I only get the most recent messages. I see that Telegram has an API, but I am not sure how to use it to log in to my account and get a day's worth of chat histories from my groups. Is Watir a viable option for this kind of scraping job?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter