自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 问答 (1)
  • 收藏
  • 关注

原创 BeautifulSoup求助

想一步爬取3条数据,attrs里面的class如何模糊匹配。

2024-01-15 17:27:37 463 2

原创 rsa&md5

RSA公钥加密 pip3 install pycrypto import json import requests import base64 from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 key = ‘xxxxx’ rsa_key = '-----BEGIN PUBLIC KEY---...

2019-11-12 14:17:15 324

原创 前端基础

1、标签 1.1、排版标签 标签名字 定义 说明 <h> </h> <p> </p> <hr /> <br /> <div> </div> <span...

2018-06-13 17:12:57 233

原创 unittest控制case执行顺序

1、名字改成test_a_xxx, test_b_xxx格式,会分别执行a, b, .... 2、 suite = unittest.TestSuite() suite.addTest(类名('函数名1')) suite.addTest(类名('函数名2')) ...... runner = unittest.TextTestRunner(...

2018-03-14 14:10:28 2278

原创 Python multiprocessing.Queue() 和 queue.Queue区别

Queue.Queue是进程内非阻塞队列。 multiprocess.Queue是跨进程通信队列。 多进程前者是各自私有,后者是各子进程共有。

2018-01-31 09:25:08 4452

原创 BeautifulSoup

from bs4 import BeautifulSoup import requests url = 'https://book.douban.com/subject/1770782/' response = requests.get(url).text soup = BeautifulSoup(response, 'html.parser') #获取div中class为intro的信息 ...

2018-01-30 15:15:36 203

原创 tcp/ip

tcp/ip模型 tcp/ip传输 三次握手 四次挥手

2018-01-30 11:17:38 231

原创 yaml和ini

yaml 冒号: ------>字典 横杠-------->列表 操作:open函数打开yaml文件,f.read读取,yaml.load格式化 例: yaml_file = './a.yaml' with open(yaml_file, 'r') as f: contents = f.read() re...

2018-01-30 11:14:26 554

原创 requests接口测试

get import requests import json url= 'https://m.douban.com/rexxar/api/v2/muzzy/columns/10008/items?start=0&count=3' response = requests.get(url) contents = json.loads(r...

2018-01-29 16:41:43 891

原创 mac安装virtualenv

1、安装 1)pip3 install virtualenv 2)pip3 install virtualenvwrapper virtualenvwrapper是virtualenv的拓展包 2、环境变量 1)vim ~/.bash_profile 2)输入 export VIRTUALENVWRAPPER_PYTH...

2018-01-29 16:40:41 258

原创 windows远程连接阿里云ubuntu(mstsc)

本地windows远程桌面连接阿里云Ubuntu 16.04服务器 1、windows安装securecrt 2、securecrt ssh连接阿里云服务器 3、apt-get update 4、安装xrdp:apt-get install xrdp-->回车-->输入"y"-->回车,安装完成 (xrdp: An open so...

2018-01-23 14:25:20 5181

原创 appium+allure+pytest

1、环境搭建 brew install allure npm installappium pip3 install pytest pip3 install allure-pytest pip3 install pytest-allure-adaptor sudo pip3 install Appium-Python-Client ...

2018-01-22 14:22:32 653

原创 random

random.random() -------取浮点数x,0<=x<1 In [36]: random.random() Out[36]: 0.209811164981883 In [37]: random.random() Out[37]: 0.9981253745428653 In [38]: random.random() Out[38]: 0.3911322367559...

2018-01-16 15:34:36 223

原创 ip地址分类

ip地址的分类 每一个IP地址包括两部分:网络地址和主机地址 1 、A类IP地址 一个A类IP地址由1字节的网络地址和3字节主机地址组成,网络地址的最高位必须是“0”, 地址范围1.0.0.1-126.255.255.254 二进制表示为:00000001 00000000 00000000 00000001 - 01111110 11111111 11111111 1111111...

2018-01-15 15:12:03 345

原创 selenium

1、搭建环境 1)安装python3+selenium brew install python3 pip3 install selenium(安装最新版) 或pip3 install selenium==版本号(安装指定版本号) 没有特殊要求安装最新版即可 2)下载chrome浏览器和chromedriver chromedri...

2018-01-10 10:51:31 348

原创 python基础

1、number, string, [], (), {} 2、if, for, while 3、class,def 4、正则 pattern = r'\d+(.*?)\d+', re.match(pattern, string) re.search(pattern, string) a = '123abc123' r...

2018-01-07 16:52:13 257

原创 mysql基础

#连接mysql mysql -h127.0.0.1 -p3306 -uroot -p #查看数据库 show databases; #创建数据库 create database xxx; #删除数据库 drop database xxx; #使用数据库 use xxx; #显示数据库中的表 show tables; #创建表 create t...

2017-03-24 18:11:12 721

空空如也

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

TA关注的人

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