f'{root}/movies'
requests = requests.get(website)
content = requests.text
soup = bs(content, 'lxml')
links = []
box = soup.find('article', class_='main-article')
for link in box.find_all('a', href=True):
links.append(link['href'])
print(links)
for link in links:
website = f'{root}/{link}'
requests = requests.get(website)
content = requests.text
soup = bs(content, 'lxml')
box = soup.find('article', class_='main-article')
title = box.find('h1').get_text()
text = box.find('div', class_='full-script').get_text('\n', strip=True)
with open(f'{title}.txt','w') as file:
file.write(text)
`
requests = requests.get(website)
AttributeError: 'Response' object has no attribute 'get' как решить проблему?
requests не переопределять
Обсуждают сегодня