Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataWhale

1.1 学习get与post请求 学习get与post请求,尝试使用requests或者是urllib用get方法向https://www.baidu.com/发出一个请求,并将其返回结果输出。

如果是断开了网络,再发出申请,结果又是什么。了解申请返回的状态码。

了解什么是请求头,如何添加请求头。

1.2 正则表达式 学习什么是正则表达式并尝试一些正则表达式并进行匹配。

然后结合requests、re两者的内容爬取https://movie.douban.com/top250里的内容

要求抓取名次、影片名称、年份、导演等字段。

参考资料: https://desmonday.github.io/2019/03/02/python爬虫学习-day2正则表达式/

2.1 学习beautifulsoup 学习beautifulsoup,并使用beautifulsoup提取内容。

使用beautifulsoup提取丁香园论坛的回复内容。

丁香园直通点:http://www.dxy.cn/bbs/thread/626626#626626

参考资料:https://blog.csdn.net/wwq114/article/details/88085875

**2.2学习xpath ** 学习xpath,使用lxml+xpath提取内容。

使用xpath提取丁香园论坛的回复内容。

丁香园直通点:http://www.dxy.cn/bbs/thread/626626#626626

参考资料:https://blog.csdn.net/naonao77/article/details/88129994

参考答案1

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages