1
1
1998or22021-03-03 17:18:56
Python
1998or2, 2021-03-03 17:18:56

How to parse (python/django) IMDb rating and Kinopoisk to your website?

How to parse IMDb rating and Kinopoisk to your site using python/django?
So that the rating numbers are taken from source sites (IMDb and Kinopoisk) and when the rating changes, for example, on IMDb, the rating also changes on my site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
datka, 2021-03-04
@datka

In theory, you need a database where ratings will be stored. Then you need to decide whether you will parse the entire IMDB / Kinopoisk or you will have a list of movies-series for which you will need to search for a rating.
1) If the entire IMDB / Kinopoisk. Then you have to parse each movie separately. Take the rating from there and put it in the database. At this stage, you need to think about how to make sure that your IP addr is not banned for parsing. In addition to everything else, it may be that the name of the film on IMDB will not match the name of the film on Kinopoisk, and this is a separate crap. Also, do not forget the time for which the parsing will be done.
2) If the list of films-series for which it will be necessary to look for a rating. It’s a little simpler here, you make a list and maybe through the API, maybe through requests you do a search on movie sites. Then you parse the link to the film itself and take the rating if the search does not show the rating, of course.
So you will get an IMDB / Kinopoisk rating. And then it will be necessary to decide how to update the rating. There is also a lot of hemorrhoids. Well, how to tie it all to django
PS: follow the example as they wrote to you in the comments. Start simple.
Search Google: BeautifulSoup, Selenim, Requests, Python

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question