Answer the question
In order to leave comments, you need to log in
How to decode string in python?
The task is following: to receive the description of a film from kinopoisk. The evil film search, unfortunately, does not provide its own API. I had to look for a homemade one, I found this one: kinopoiskpy
I write the following code:
from kinopoisk.movie import Movie
movie = Movie(id=843650)
movie.get_content('main_page')
plot = movie.plot
print(plot)
plot = movie.plot.encode('cp1251', 'ignore').decode('utf-8', 'ignore')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question