未完成
豆瓣电影
https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&start=660&limit=20
https://movie.douban.com/j/chart/top_list?type=24&interval_id=100%3A90&action=&start=490&limit=20
https://movie.douban.com/j/chart/top_list?type=24&interval_id=100%3A90&action=&start=490&limit=10
二分法判断电影数量:返回为空
headers = {
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
'referer': 'https://movie.douban.com/typerank?type_name=%E5%89%A7%E6%83%85&type=11&interval_id=100:90&action=',
'Host': 'movie.douban.com'
}
#也是可以的
headers = {
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
'Host': 'movie.douban.com'
}
response = requests.get("https://movie.douban.com/j/chart/top_list?type=24&interval_id=100%3A90&action=&start=490&limit=10", headers=headers)