Моя трассировка ошибки:
AttributeError: ResultSet object has no attribute 'find'.
You're probably treating a list of items like a single item.
Did you call find_all() when you meant to call find()?
Мой код указан ниже:
while True:
response= requests.get(url)
response
data=response.text
soup= BeautifulSoup(data,'html.parser')
apis=soup.find_all('tr',{"class":"odd views-row-first"})
for api in apis:
name= apis.find('td',{"class":"views-field views-field-pw-version-title"}).text
des=apis.find('td',{'class':'views-field views-field-search-api-excerpt views-field-field-api-description hidden-xs visible-md visible-sm col-md-8'}).text
category=apis.find('td',{'class':'views-field views-field-field-article-primary-category'}).text
link= apis.find('a',{'class':'views-field views-field-pw-version-title'}).get('href')
print('Name:',name,'\nDescription:', des ,'\ncategory', category ,'\nLink', link)
url_tag=soup.find('a',{'title':'Go to next page'})
if url_tag.get('href'):
url= url_tag.get('href')
print(url)
else:
break