Answer the question
In order to leave comments, you need to log in
What is the best way to implement checking for new news?
There is a news site. It is necessary to make a parser that will check every 2 hours, for example, for new news and add if there are any. News are displayed at different intervals. How to properly implement check for new ones?
Answer the question
In order to leave comments, you need to log in
I did it this way: I loaded the main page of the site (for example, there are 20 latest news on the main page). Saved links to news pages to a file. Then, every half hour, I loaded old links from the file into the list. Then he loaded and parsed again the main page of the site and checked if there were links from the loaded page in the list. If there is, then the news is old, if not, then the news is new, and a link to it was added to the file. And so in a circle.
PS: The screenshot you provided is meaningless.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question