A
A
Andrey Radaev2020-05-31 12:21:21
Parsing
Andrey Radaev, 2020-05-31 12:21:21

Process finished with exit code 2?

C:\Users\Андрей\PycharmProjects\parse.py\padsdfe.py\Scripts\python.exe C:/Users/Андрей/Desktop/ee.py
C:\Users\������\AppData\Local\Programs\Python\Python38\python.exe: can't open file 'C:/Users/Андрей/Desktop/ee.py': [Errno 2] No such file or directory
Process finished with exit code 2-

this inscription appears when entering the code:
import requests
from bs4 import BeautifulSoup as BS

r=requests.get('https://www.kinopoisk.ru/top/navigator/m_act[country]/1%2C1/m_act[hide]/on/m_act[years]/2019%3A/m_act[num_vote]/12500/m_act[ex_rating]/6%3A/m_act[is_film]/on/order/ex_rating/#results')
html=BS(r.content,'html.parser')
for el in html.select('.ten-Items'):
    title=el.select('.name > a')
    print(title[0].text)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-05-31
@hottabxp

You need to move the .py file to a directory where there are no Cyrillic characters in the path. The same can be done with the interpreter.
Kinopoisk returns requests' captcha. You can verify by running this code:

import requests

r=requests.get('https://www.kinopoisk.ru/top/navigator/m_act%5Bcountry%5D/1%2C1/m_act%5Bhide%5D/on/m_act%5Byears%5D/2019%3A/m_act%5Bnum_vote%5D/12500/m_act%5Bex_rating%5D/6%3A/m_act%5Bis_film%5D/on/order/ex_rating/#results')
print(r.text)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question