爬虫
whk3223
这个作者很懒,什么都没留下…
展开
-
10.4---Python入门之-爬虫-虎嗅网站内容解析及,及结果保存MySQL表
""""""import urllib.requestimport MySQLdbfrom bs4 import BeautifulSoup"""自定义: 爬取 指定网页中,所有的新闻url地址 方法"""def parse_index_page(url): ## 获取虎嗅网站首页的内容 index_page = urllib.request.urlopen(url).read().decode("utf-8") ## 解析内容 # 创建一.原创 2021-05-18 18:00:02 · 269 阅读 · 0 评论 -
10.3---Python入门之虎嗅网站信息爬取-所有的新闻url地址
""""""import urllib.requestfrom bs4 import BeautifulSoup'''定义: 爬取 指定网页中,所有的新闻url地址'''############################################### 直接操作# ## 定义需要爬取的网站URL# url = "https://www.huxiu.com"## ## 获取虎嗅网站首页的内容# index_page = urllib.request..原创 2021-05-17 18:02:23 · 431 阅读 · 0 评论