Answer the question
In order to leave comments, you need to log in
What to learn to implement a bot that will look for discounts on certain sites?
I want to write a bot in the TG, which, at the request of a person, will look for the biggest discount on the game on 3 sites.
For example, a person wrote to the bot: PUBG
And the bot went to 3 sites, entered this phrase into the search, went through the first search result, copied the price tag, discount, went through the buy tab and copied its URL.
How to implement it?
What PYthon libraries or methods should I learn and use? And if possible, then in more detail, which sections should I study?
Answer the question
In order to leave comments, you need to log in
you need to learn at least 3 things:
1. what is parsing
2. how to parse in python
3. how to process and compare the received data,
then all that remains is to learn how to write a bot and combine it with the received data.
but this is not certain: there is a suspicion that the matter will stall at the points described above.
You will need basic knowledge of the language, be able to correctly apply cycles and conditions.
More specifically, for your bot you need to learn how to use the selenium library.
Read a series of these articles:
https://habr.com/ru/post/248559/
And you will already have a 100% idea of how to implement your bot.
In fact, everything is not so difficult.
You are making a bot for telegrams, as I understand it, you already know how.
Next, take a search phrase (let's say Fallout New Vegas), now you need to make a request to a site with discounts.
If the site has an API - do it through it. If there is no API, then there will be something like the following scheme:
requests
make a similar request to the siteBeautifulSoup 4
, parse the page, find the first link from the search results, go to it throughrequests
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question