摘要:
requests库常用于http请求,可以很方便对网页进行爬取; 主要方法(七个): 1.requests.get 原型: r = requests.get(url,params, **kwargs) url: 网站地址; params: 参数, 额外参数,可以使字典或者字节流 **kwargs: 阅读全文
posted @ 2018-07-16 22:33
时光旅者
阅读(806)
评论(0)
推荐(0)
摘要:
import requests from bs4 import BeautifulSoup as bs import html5lib header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Sa... 阅读全文
posted @ 2018-07-16 22:25
时光旅者
阅读(316)
评论(0)
推荐(0)
摘要:
转载: https://www.cnblogs.com/chimeiwangliang/p/8649003.htmlfrom bs4 import BeautifulSoup import requests,re req_obj = requests.get('https://www.baidu.com') soup = BeautifulSoup(req_obj.text,'lxml') '... 阅读全文
posted @ 2018-07-16 22:03
时光旅者
阅读(1177)
评论(0)
推荐(0)
摘要:
最近晚上学习爬虫,首先从基本的开始; python3 将urllib,urllib2集成到urllib中了, urllib可以对指定的网页进行请求下载, beautifulsoup 可以从杂乱的html代码中 分离出我们需要的部分; 注: beautifulsoup 是一种可以从html 或XML文 阅读全文
posted @ 2018-07-16 21:46
时光旅者
阅读(917)
评论(0)
推荐(0)
摘要:
注: 该博文为原创博文,转载请注明,摘用请随意; qml自带的滚动条不太好用; 首先,利用canvas绘制滚动条两端的箭头: 然后,自定义整个滚动条: 使用实例: 阅读全文
posted @ 2018-07-16 14:30
时光旅者
阅读(3095)
评论(1)
推荐(1)

浙公网安备 33010602011771号