摘要: 1. 用requests库和BeautifulSoup库,爬取校园新闻首页新闻的标题、链接、正文。 import requests from bs4 import BeautifulSoup url = 'http://news.gzcc.cn/html/xiaoyuanxinwen/' res = 阅读全文
posted @ 2018-04-02 20:09 120林海鑫 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 0.可以新建一个用于练习的html文件,在浏览器中打开。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>This is the docume 阅读全文
posted @ 2018-04-02 20:01 120林海鑫 阅读(80) 评论(0) 推荐(0) 编辑