自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

转载 python_6_21

笔记 scrapy爬虫框架 The data flow in Scrapy is controlled by the execution engine, and goes like this: 1.The Engine gets the initial Requests to crawl from the Spider. 2.The Engine schedules the Requests i...

2019-06-21 21:01:51 340

原创 python_6_20

笔记 1、BeautifulSoup 解析库 2、MongoDB 存储库 3、requests-html 请求库 BeautifulSoup 1、什么bs4,为什么要使用bs4? 是一个基于re开发的解析库,可以提供一些强大的解析功能。 提高提取数据的效率与爬虫开发效率。 2、安装与使用 pip3 install beautifulsoup4 # 安装bs4 pip3 install lxml ...

2019-06-21 20:05:21 191

原创 python_6_19

笔记 破解极验滑动验证 from selenium import webdriver from selenium.webdriver import ActionChains from PIL import Image import time import random def main(): driver = webdriver.Chrome() driver.implicit...

2019-06-19 21:24:47 191

原创 python_6_18

笔记 自动登陆抽屉新热榜 from selenium import webdriver import time driver = webdriver.Chrome(r'D:\BaiduNetdiskDownload\chromedriver_win32\chromedriver.exe') # 把窗口转成全屏 driver.maximize_window() try: driver....

2019-06-19 21:19:31 192

原创 python_6_17

笔记 爬虫步骤 给url发送请求 requests.get('http://www.baidu.com/') 解析数据 正则模块 import re re.findall('<a href="video_(.*?)"', response.text, re.S) 保存数据 GET请求 访问知乎发现 请求url: https://www.zhihu.com/explore...

2019-06-18 21:46:42 483

原创 python_6_14

笔记 请求库: requests selenium 解析库: re正则 bs4(BeautifulSoup4) Xpath 存储库: MongoDB 爬多个视频 # 爬虫 # 发送请求 ...

2019-06-17 07:59:40 184

原创 python_6_13

笔记 函数三种定义方式 无参函数,不需要接受外部传入的参数 def foo(): print('from foo) foo() 有参函数,需要接受外部传入参数 def login(user,pwd): print(user,pwd) login('tian','666') 空函数 def func(): pass 函数返回值 def max2(x,y): if x ...

2019-06-13 22:11:46 167

原创 python6_12

笔记 列表常用方法 insert()插入 list1 = ['tian',18,'harbin',80] list1.insert(2,'old') print(list1) pop()取出 print(list1.pop()) print(list2.pop(2)) remove()移除 list1.remove(2) print(list1) count()计数 print(l...

2019-06-12 22:12:04 329

原创 python6_11

笔记 列表嵌套 list2 = ['tianxinxin',['heilongjiang','harbin']] print(list2[1][1]) 按索引取值 str1 = 'my name is xxx, my age is 18.' print(str1[3]) 切片 print(str1[3:7]) 步长为2 print(str1[3:10:2]) 成员运算in和not in pri...

2019-06-11 23:25:12 368

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除