![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
freshbin000
默默搬砖
展开
-
python学习-第一篇
""" Version: 0.1 Author: freshbin Date: 2019年8月19日 """ print("=================================注释 start================================================") # 注释 是任何存在于 # 号右侧的文字,其主要用作写给程序读者看的笔记。 # 你...原创 2019-08-19 16:23:15 · 68 阅读 · 0 评论 -
爬虫学习-第九篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================MySql的存储 start================================================") import pymysql db = pymysql.connect(h...原创 2019-08-28 10:45:09 · 180 阅读 · 0 评论 -
爬虫学习-第十篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================xpath使用 start================================================") ''' XPath的常用匹配规则 表达式 ...原创 2019-08-28 15:38:29 · 78 阅读 · 0 评论 -
爬虫学习-第十一篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================pyquey使用 start================================================") # 初始化 html = ''' <div class="wrap"...原创 2019-08-28 21:14:51 · 108 阅读 · 0 评论 -
爬虫学习-第十二篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================txt文本存储 start================================================") import requests from pyquery import Py...原创 2019-08-28 21:41:03 · 67 阅读 · 0 评论 -
爬虫学习-第十三篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================JSON文本存储 start================================================") import json str = ''' [{ "name":...原创 2019-08-28 21:56:42 · 88 阅读 · 0 评论 -
爬虫学习-第十四篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================CSV start================================================") import csv # with open('data.csv', 'w') a...原创 2019-08-28 22:20:54 · 68 阅读 · 0 评论 -
爬虫学习-第十五篇
""" Version: 0.1 Author: freshbin Date: 2019年8月28日 """ print("=================================mongodb学习 start================================================") # 非关系型数据库细分如下 ''' 键值存储数据库:代表有redis、v...原创 2019-08-29 10:34:55 · 94 阅读 · 0 评论 -
爬虫学习-第十六篇
""" Version: 0.1 Author: freshbin Date: 2019年8月29日 """ print("=================================mongodb学习 start================================================") """ from redis import StrictRedis re...原创 2019-08-29 11:07:42 · 85 阅读 · 0 评论 -
爬虫学习-第十七篇
""" Version: 0.1 Author: freshbin Date: 2019年8月29日 """ print("=================================ajax start================================================") # http://www.w3school.com.cn/ajax_xmlhttp...原创 2019-08-29 11:50:17 · 95 阅读 · 0 评论 -
爬虫学习-第十八篇
import requests from urllib.parse import urlencode from requests import codes import os from hashlib import md5 from multiprocessing.pool import Pool import re def get_page(offset): headers = {...原创 2019-08-29 15:19:27 · 290 阅读 · 0 评论 -
爬虫学习-第十九篇
""" Version: 0.1 Author: freshbin Date: 2019年8月29日 """ print("=================================selenium start================================================") """ from selenium import webdriver fro...原创 2019-08-30 09:49:37 · 145 阅读 · 1 评论 -
爬虫学习-第二十篇
""" Version: 0.1 Author: freshbin Date: 2019年8月30日 """ print("=================================selenium爬取淘宝商品信息 start================================================") from selenium import webdrive...原创 2019-08-30 12:00:00 · 282 阅读 · 0 评论 -
爬虫学习-第二十一篇
""" Version: 0.1 Author: freshbin Date: 2019年9月2日 """ print("=================================图形验证码的识别 start================================================") import tesserocr from PIL import Image...原创 2019-09-02 17:37:22 · 77 阅读 · 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 · 576 阅读 · 0 评论 -
爬虫学习-第二十三篇
""" Version: 0.1 Author: freshbin Date: 2019年9月3日 """ print("=================================代理的设置 start================================================") """ # urllib from urllib.error import URLE...原创 2019-09-03 15:21:16 · 114 阅读 · 0 评论 -
爬虫学习-第八篇
""" Version: 0.1 Author: freshbin Date: 2019年8月26日 """ print("=================================抓取猫眼电影榜单 start================================================") import requests import re import json...原创 2019-08-26 15:10:37 · 95 阅读 · 0 评论 -
爬虫学习-第七篇
""" Version: 0.1 Author: freshbin Date: 2019年8月26日 """ print("=================================正则表达式 start================================================") # 正则表达式网页小工具 http://tool.oschina.net/reg...原创 2019-08-26 11:19:19 · 88 阅读 · 0 评论 -
爬虫学习-第五篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com """ Version: 0.1 Author: freshbin Date: 2019年8月23日 """ print("=================================分析Robots协议 start================...原创 2019-08-23 15:40:24 · 98 阅读 · 0 评论 -
爬虫学习-第六篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com """ Version: 0.1 Author: freshbin Date: 2019年8月23日 """ print("=================================使用requests start================...原创 2019-08-23 17:51:40 · 337 阅读 · 0 评论 -
python学习-第二篇
""" Version: 0.1 Author: freshbin Date: 2019年8月20日 """ print("=================================运算符与表达式 start================================================") #可用运算符: """ · + (加) · - (减) · * (乘) · ...原创 2019-08-20 10:27:14 · 109 阅读 · 0 评论 -
python学习-第三篇
""" Version: 0.1 Author: freshbin Date: 2019年8月20日 """ print("=================================if语句 start================================================") number = 23 guess = int(input('Enter an i...原创 2019-08-20 10:46:59 · 85 阅读 · 0 评论 -
python学习-第四篇
""" Version: 0.1 Author: freshbin Date: 2019年8月20日 """ print("=================================函数 start================================================") # 局部变量 x = 50 def func_x(x): print('x ...原创 2019-08-20 14:47:03 · 100 阅读 · 0 评论 -
python学习-第五篇
""" Version: 0.1 Author: freshbin Date: 2019年8月20日 """ print("=================================模块 start================================================") import sys print('The command line argument...原创 2019-08-20 15:54:09 · 68 阅读 · 0 评论 -
python学习-第六篇
""" Version: 0.1 Author: freshbin Date: 2019年8月20日 """ print("=================================数据结构 start================================================") # python内置的四种数据结构:列表、元组、字典和集合 print("====...原创 2019-08-20 17:08:18 · 85 阅读 · 0 评论 -
python学习-第七篇
""" Version: 0.4 Author: freshbin Date: 2019年8月20日 """ import os import time import zipfile # 需要备份的文件目录 source = 'E:/python/myexample/pythonExample/day001/test007Data/needBak' # 存储的目录 target_dir= '...原创 2019-08-20 18:36:45 · 79 阅读 · 0 评论 -
python学习-第八篇
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================类 start================================================") class Person: pass class Person01: ...原创 2019-08-21 10:35:56 · 74 阅读 · 0 评论 -
python学习-第九偏
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================输入与输出 start================================================") def reverse(text): return text[::-1]...原创 2019-08-21 11:23:35 · 85 阅读 · 0 评论 -
python学习-第十篇
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================文件 start================================================") poem = '''\ Programming is fun When the wor...原创 2019-08-21 14:35:52 · 80 阅读 · 0 评论 -
python学习-第十一篇
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================错误 start================================================") # Print('ERROR') # NameError: name 'Print' ...原创 2019-08-21 15:07:05 · 68 阅读 · 0 评论 -
python学习-第十二篇
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================日志模块 start================================================") import os import platform import logging ...原创 2019-08-21 15:46:01 · 106 阅读 · 0 评论 -
python学习-第十三篇
""" Version: 0.1 Author: freshbin Date: 2019年8月21日 """ print("=================================传递元组 start================================================") def get_error_details(): return (2, '...原创 2019-08-21 17:26:20 · 106 阅读 · 0 评论 -
python学习-第十四篇
""" Version: 0.1 Author: freshbin Date: 2019年8月22日 """ print("=================================装饰器 start================================================") from time import sleep from functools impo...原创 2019-08-22 10:46:55 · 105 阅读 · 0 评论 -
爬虫学习-第四篇
首先感谢崔庆才博主的文章,以下信息都是在其文章与《python3网络爬虫开发实战》书中摘抄出的https://cuiqingcai.com """ Version: 0.1 Author: freshbin Date: 2019年8月23日 """ print("=================================处理异常 start======================...原创 2019-08-23 15:19:38 · 98 阅读 · 0 评论 -
爬虫学习-第二十四篇
import requests from lxml import etree from pyquery import PyQuery as pq cookie = None headers = None class Login(object): def __init__(self): self.login_url = 'https://github.com/login...原创 2019-09-06 10:07:46 · 108 阅读 · 0 评论