0. 网址分类

1. 爬取“喜欢这部剧集的人也喜欢 ”

import requests
from bs4 import BeautifulSoup

url = "https://movie.douban.com/subject/25953429/"
soup = BeautifulSoup(requests.get(url).text, 'html.parser')

also_likes = set()
links = soup.find_all('dd')
for link in links:
    also_like = link.find_next('a')['href']
    also_likes.add(also_like)

2. 电影评论

https://mp.weixin.qq.com/s/uTIhyNVE7W6mGMneSKQNlw

posted on 2018-01-06 23:58  未雨愁眸  阅读(155)  评论(0编辑  收藏  举报