欢迎来到武韵的博客

随笔分类 -  03. 项目实战

爬取京东商品信息
摘要:import re,time,requests,bs4,csv from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.by import By from selenium 阅读全文

posted @ 2019-11-26 16:36 武韵 阅读(116) 评论(0) 推荐(0) 编辑

实例二:淘宝商品比价定向爬虫
摘要:import requestsimport redef getHTMLText(url): try: r = requests.get(url, timeout = 30) r.raise_for_status() r.encoding = r.apparent_encoding return r. 阅读全文

posted @ 2019-11-22 18:34 武韵 阅读(479) 评论(0) 推荐(0) 编辑

实例一:中国大学排名爬取
摘要:import requestsfrom bs4 import BeautifulSoupimport bs4def getHTMLText(url): try: r = requests.get(url, timeout = 30) r.raise_for_status() r.encoding = 阅读全文

posted @ 2019-11-22 12:50 武韵 阅读(231) 评论(0) 推荐(0) 编辑

Requests库练习
摘要:实例一:京东商品页面爬取import requestsurl = "http://item.jd.com/2967929.html"try: r = requests.get(url) r.raise_for_status() r.encoding = r.apparent_encoding pri 阅读全文

posted @ 2019-11-22 12:48 武韵 阅读(348) 评论(0) 推荐(0) 编辑

导航