How to set this start in my Python WebCtach Project,I want it to continuly to catch the data i want.Thanks a lot!
Here is my project under bellow
import requests
import bs4
link="https://movie.douban.com/top250"
headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36"}
r=requests.get(link,headers=headers)
r.encoding="utf-8"
html=r.text
bs=bs4.BeautifulSoup(html,"html.parser")
div_lst=bs.find_all("div",{"class":"info"})
for span in div_lst:
name=span.find("span",{"class":"title"}).string
score=span.find("span",{"class":"rating_num"}).string
if float(score)>9.5:
print(name)
print(score)
print("------------------------------")