
python
freshbin000
默默搬砖
展开
-
python学习-第一篇
"""Version: 0.1Author: freshbinDate: 2019年8月19日"""print("=================================注释 start================================================")# 注释 是任何存在于 # 号右侧的文字,其主要用作写给程序读者看的笔记。# 你...原创 2019-08-19 16:23:15 · 89 阅读 · 0 评论 -
爬虫学习-第九篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================MySql的存储 start================================================")import pymysqldb = pymysql.connect(h...原创 2019-08-28 10:45:09 · 214 阅读 · 0 评论 -
爬虫学习-第十篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================xpath使用 start================================================")'''XPath的常用匹配规则表达式 ...原创 2019-08-28 15:38:29 · 98 阅读 · 0 评论 -
爬虫学习-第十一篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================pyquey使用 start================================================")# 初始化html = '''<div class="wrap"...原创 2019-08-28 21:14:51 · 134 阅读 · 0 评论 -
爬虫学习-第十二篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================txt文本存储 start================================================")import requestsfrom pyquery import Py...原创 2019-08-28 21:41:03 · 90 阅读 · 0 评论 -
爬虫学习-第十三篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================JSON文本存储 start================================================")import jsonstr = '''[{ "name":...原创 2019-08-28 21:56:42 · 118 阅读 · 0 评论 -
爬虫学习-第十四篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================CSV start================================================")import csv# with open('data.csv', 'w') a...原创 2019-08-28 22:20:54 · 93 阅读 · 0 评论 -
爬虫学习-第十五篇
"""Version: 0.1Author: freshbinDate: 2019年8月28日"""print("=================================mongodb学习 start================================================")# 非关系型数据库细分如下'''键值存储数据库:代表有redis、v...原创 2019-08-29 10:34:55 · 130 阅读 · 0 评论 -
爬虫学习-第十六篇
"""Version: 0.1Author: freshbinDate: 2019年8月29日"""print("=================================mongodb学习 start================================================")"""from redis import StrictRedisre...原创 2019-08-29 11:07:42 · 103 阅读 · 0 评论 -
爬虫学习-第十七篇
"""Version: 0.1Author: freshbinDate: 2019年8月29日"""print("=================================ajax start================================================")# http://www.w3school.com.cn/ajax_xmlhttp...原创 2019-08-29 11:50:17 · 122 阅读 · 0 评论 -
爬虫学习-第十八篇
import requestsfrom urllib.parse import urlencodefrom requests import codesimport osfrom hashlib import md5from multiprocessing.pool import Poolimport redef get_page(offset): headers = {...原创 2019-08-29 15:19:27 · 329 阅读 · 0 评论 -
爬虫学习-第十九篇
"""Version: 0.1Author: freshbinDate: 2019年8月29日"""print("=================================selenium start================================================")"""from selenium import webdriverfro...原创 2019-08-30 09:49:37 · 185 阅读 · 1 评论 -
爬虫学习-第二十篇
"""Version: 0.1Author: freshbinDate: 2019年8月30日"""print("=================================selenium爬取淘宝商品信息 start================================================")from selenium import webdrive...原创 2019-08-30 12:00:00 · 353 阅读 · 0 评论 -
爬虫学习-第二十一篇
"""Version: 0.1Author: freshbinDate: 2019年9月2日"""print("=================================图形验证码的识别 start================================================")import tesserocrfrom PIL import Image...原创 2019-09-02 17:37:22 · 97 阅读 · 0 评论 -
爬虫学习-第二十二篇
这个是极验滑动验证码的识别,照着书上的例子发现不太行,获取不到验证码图片,于是上网找了一遍,发现有位大神重新封装了chromedriver,于是我照搬过来,发现可以运行,封装的py文件为selenium.spider.py"""@author: Liubing@software: PyCharm@file: selenium_spider.py@time: 2019-03-11 13...原创 2019-09-02 17:42:23 · 642 阅读 · 0 评论 -
爬虫学习-第二十三篇
"""Version: 0.1Author: freshbinDate: 2019年9月3日"""print("=================================代理的设置 start================================================")"""# urllibfrom urllib.error import URLE...原创 2019-09-03 15:21:16 · 132 阅读 · 0 评论 -
爬虫学习-第八篇
"""Version: 0.1Author: freshbinDate: 2019年8月26日"""print("=================================抓取猫眼电影榜单 start================================================")import requestsimport reimport json...原创 2019-08-26 15:10:37 · 117 阅读 · 0 评论 -
爬虫学习-第七篇
"""Version: 0.1Author: freshbinDate: 2019年8月26日"""print("=================================正则表达式 start================================================")# 正则表达式网页小工具 http://tool.oschina.net/reg...原创 2019-08-26 11:19:19 · 117 阅读 · 0 评论 -
爬虫学习-第五篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com"""Version: 0.1Author: freshbinDate: 2019年8月23日"""print("=================================分析Robots协议 start================...原创 2019-08-23 15:40:24 · 120 阅读 · 0 评论 -
爬虫学习-第六篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com"""Version: 0.1Author: freshbinDate: 2019年8月23日"""print("=================================使用requests start================...原创 2019-08-23 17:51:40 · 377 阅读 · 0 评论 -
python学习-第二篇
"""Version: 0.1Author: freshbinDate: 2019年8月20日"""print("=================================运算符与表达式 start================================================")#可用运算符:"""· + (加)· - (减)· * (乘)· ...原创 2019-08-20 10:27:14 · 142 阅读 · 0 评论 -
python学习-第三篇
"""Version: 0.1Author: freshbinDate: 2019年8月20日"""print("=================================if语句 start================================================")number = 23guess = int(input('Enter an i...原创 2019-08-20 10:46:59 · 107 阅读 · 0 评论 -
python学习-第四篇
"""Version: 0.1Author: freshbinDate: 2019年8月20日"""print("=================================函数 start================================================")# 局部变量x = 50def func_x(x): print('x ...原创 2019-08-20 14:47:03 · 122 阅读 · 0 评论 -
python学习-第五篇
"""Version: 0.1Author: freshbinDate: 2019年8月20日"""print("=================================模块 start================================================")import sysprint('The command line argument...原创 2019-08-20 15:54:09 · 90 阅读 · 0 评论 -
python学习-第六篇
"""Version: 0.1Author: freshbinDate: 2019年8月20日"""print("=================================数据结构 start================================================")# python内置的四种数据结构:列表、元组、字典和集合print("====...原创 2019-08-20 17:08:18 · 108 阅读 · 0 评论 -
python学习-第七篇
"""Version: 0.4Author: freshbinDate: 2019年8月20日"""import osimport timeimport zipfile# 需要备份的文件目录source = 'E:/python/myexample/pythonExample/day001/test007Data/needBak'# 存储的目录target_dir= '...原创 2019-08-20 18:36:45 · 105 阅读 · 0 评论 -
python学习-第八篇
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================类 start================================================")class Person: passclass Person01: ...原创 2019-08-21 10:35:56 · 100 阅读 · 0 评论 -
python学习-第九偏
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================输入与输出 start================================================")def reverse(text): return text[::-1]...原创 2019-08-21 11:23:35 · 106 阅读 · 0 评论 -
python学习-第十篇
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================文件 start================================================")poem = '''\Programming is funWhen the wor...原创 2019-08-21 14:35:52 · 103 阅读 · 0 评论 -
python学习-第十一篇
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================错误 start================================================")# Print('ERROR')# NameError: name 'Print' ...原创 2019-08-21 15:07:05 · 93 阅读 · 0 评论 -
python学习-第十二篇
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================日志模块 start================================================")import osimport platformimport logging...原创 2019-08-21 15:46:01 · 128 阅读 · 0 评论 -
python学习-第十三篇
"""Version: 0.1Author: freshbinDate: 2019年8月21日"""print("=================================传递元组 start================================================")def get_error_details(): return (2, '...原创 2019-08-21 17:26:20 · 132 阅读 · 0 评论 -
python学习-第十四篇
"""Version: 0.1Author: freshbinDate: 2019年8月22日"""print("=================================装饰器 start================================================")from time import sleepfrom functools impo...原创 2019-08-22 10:46:55 · 128 阅读 · 0 评论 -
爬虫学习-第四篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com"""Version: 0.1Author: freshbinDate: 2019年8月23日"""print("=================================处理异常 start======================...原创 2019-08-23 15:19:38 · 120 阅读 · 0 评论 -
爬虫学习-第二十四篇
import requestsfrom lxml import etreefrom pyquery import PyQuery as pqcookie = Noneheaders = Noneclass Login(object): def __init__(self): self.login_url = 'https://github.com/login...原创 2019-09-06 10:07:46 · 139 阅读 · 0 评论