Skip to content

🕸 Simple crawler example, crawling data of Baidu Baike.

Notifications You must be signed in to change notification settings

Simplation/spider_baike_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Welcome to spider_baike_demo 👋

spider_baike_demo

Simple crawler example, crawling data of Baidu Baike.

License GitHub forks GitHub watchersGitHub followers GitHub Starts

Development Environment

  • Python 3.6.5
  • 使用 bs4、urllib、re 模块

Easy problems

  1. urllib2 和 urllib3 在 Python3.x 后都被合并到 urllib 中

  2. 百度百科的词条关于 Python 的链接已经更改了,替换成新的即可

  3. 爬取的数据显示格式不正确,open(path, 'w', encoding='utf-8')

  4. html 的标签是成对出现的,切勿粗心大意少写标签的结束。

  5. 使用正则匹配的时候,也需要进行修改:href=re.compile(r'/item/*')

About

👤 Simplation

Show your support

Give a ⭐️ if this project helped you!

About

🕸 Simple crawler example, crawling data of Baidu Baike.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages