Skip to content

hupu project #2

Description

@mugglejohnny


for i in range(1, 160):
print(i)
url = 'https://bbs.hupu.com/bxj-postdate-' + str(i)
r=rq.get(url, headers=h)
r.encoding='utf8'

print(r.text)

soup=BeautifulSoup(r.text, 'lxml')
lis = soup.find(class_="show-list").find_all('li')

运行到i= 11时报错:
lis = soup.find(class_="show-list").find_all('li')

AttributeError: 'NoneType' object has no attribute 'find_all'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions