Answer the question
In order to leave comments, you need to log in
How to write a telegram bot that can parse the specified information from news sites?
I set myself the task of writing a telegram bot with the following functionality:
Stage 1: I should receive a message about each fallen meteorite of the following type:
Location: country-region-city;
The date;
This information should be collected from news sites (conditionally the world top 100) by keywords: type of object: meteorite; location: country-region-city. That is, information appeared in the media about a new fallen object - the bot informs me about this.
Stage 2: in the second stage, I plan to display the collected data on a world map.
I know python at the level of writing elementary programs. The task does not seem super difficult, but I want to get advice from experienced ones.
Please tell me the following:
1) a roadmap for the implementation of this idea, at least in large strokes;
2) the optimal solution in your opinion;
3) in which direction to dig and what to study in order to solve this problem yourself.
Answer the question
In order to leave comments, you need to log in
I'm certainly not a pro. But I can point you in the right direction. Well, first of all, you need to scrape the pages of these sites. With some kind of periodicity, and pull out the necessary headers using regular expressions.
There are many now ready-made libraries for everything you want. don't write bicycles.
Use Telegraf (library) - in my opinion it is also in python (although I'm not sure), to interact with the telegram bot.
about the coordinates and so on. - the question is already in another. In what form will you take geolocation data? by city names?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question