05 2022 档案

摘要:今天看argv用法的时候,看的有点迷糊,索性网上搜索一下,终于看到有个清楚明了的答案了 1.我们在桌面上创建一个test.py文件,文件内容如下: from sys import argv# 这一步是解包操作(也可以不写)script,one,two,three,four = argvprint(" 阅读全文
posted @ 2022-05-27 12:44 淫鬻 阅读(1148) 评论(0) 推荐(1) 编辑
摘要:import numpy as np a = np.arange(4) print(a) b = a c = a d = b print(b is a) # True print(c is a) # True print(d is a) # True a[0] = 11 print(a, b, c, 阅读全文
posted @ 2022-05-24 23:19 淫鬻 阅读(5) 评论(0) 推荐(0) 编辑
摘要:import numpy as np a = np.arange(12).reshape((3, 4)) print(a) # 第一种分割 split 进行均匀分割 print(np.split(a, 3, axis=0)) # 横向分割3份 print(np.split(a, 4, axis=1) 阅读全文
posted @ 2022-05-24 23:16 淫鬻 阅读(24) 评论(0) 推荐(0) 编辑
摘要:import numpy as np a = np.array([1, 2, 3]) b = np.array([9, 8, 7]) # 对a b进行垂直合并 vsstack(vertical stack) c = np.vstack((a, b)) print(c.shape) print(c) 阅读全文
posted @ 2022-05-24 23:12 淫鬻 阅读(15) 评论(0) 推荐(0) 编辑
摘要:import numpy as np a = np.array([1, 2, 3, 4]) b = np.array([0, -1, 1, 2]) # 判断数列a 中的元素是否为3 print(a == 3) # [False False True False] print(a is 3) # Fa 阅读全文
posted @ 2022-05-24 23:02 淫鬻 阅读(11) 评论(0) 推荐(0) 编辑
摘要:import numpy as np # 使用np.array创建array array = np.array([[1, 2, 3], [4, 7, 9]]) # array.ndim() 判断array是几维的(此array为2维) print('array.ndim:', array.ndim) 阅读全文
posted @ 2022-05-24 22:39 淫鬻 阅读(50) 评论(0) 推荐(0) 编辑
摘要:# 导包 from selenium import webdriver from time import sleep # 加载驱动,打开URL页面 from selenium.webdriver.support.select import Select driver = webdriver.Fire 阅读全文
posted @ 2022-05-14 16:07 淫鬻 阅读(605) 评论(0) 推荐(0) 编辑
摘要:# 导包 from selenium import webdriver import time # 加载驱动,打开URL页面 driver = webdriver.Firefox() URL = r"C:\Users\I\Desktop\TEST_A\selenium\source\注册A.html 阅读全文
posted @ 2022-05-14 09:13 淫鬻 阅读(16) 评论(0) 推荐(0) 编辑
摘要:区别: 显示等待针对单个元素,隐式等待针对全局 显示等待直接调用,隐式等待方法封装在WebDriverWait类里面 显示等待抛出异常为TimeoutException,隐式等待NoSuchElementException 阅读全文
posted @ 2022-05-14 09:12 淫鬻 阅读(53) 评论(0) 推荐(0) 编辑
摘要:#my_01.py print('这段代码来自my_01,他将会被执行!') if __name__ == '__main__': print('这段代码如果不是导入的将会直接执行') #my_02.pyimport my_01 if __name__ == '__main__': print('这 阅读全文
posted @ 2022-05-14 00:33 淫鬻 阅读(12) 评论(0) 推荐(0) 编辑
摘要:str = u'hello 宝贝' 表示字符串里面有中文字符,字符串使用Unicode编码 str = r'https://www.baidu.com' 表示字符串里有转义字符,前面加r表示本字符串不进行转义 阅读全文
posted @ 2022-05-13 23:08 淫鬻 阅读(7) 评论(0) 推荐(0) 编辑
摘要:import unittestimport requestsimport reimport json# 第一步:截取usersession,传递到请求参数paras里面url1 = "http://127.0.0.1:1080/cgi-bin/nav.pl?in=home "session1 = r 阅读全文
posted @ 2022-05-13 22:31 淫鬻 阅读(60) 评论(0) 推荐(0) 编辑
摘要:import json # print(json.__all__) 可以打印出json的所有方法 dict1 = {"鲁智深": "鲁达", "豹子头": "林冲"} print('初始状态:', dict1) print(type(dict1)) # 将python编码转化为json字符串 str 阅读全文
posted @ 2022-05-13 21:24 淫鬻 阅读(8) 评论(0) 推荐(0) 编辑
摘要:一种是使用requests库发送(post/get/head)请求 第一种:使用requests库发送get请求(要提前安装requests库) import requests # 输入URL地址,请求方法 URL = r"http://apis.juhe.cn/ip/ipNewV3" # 输入请求 阅读全文
posted @ 2022-05-13 20:17 淫鬻 阅读(64) 评论(0) 推荐(0) 编辑
摘要:1.查看options--HTTPS--Caputure ......被勾选,取消勾选,浏览器可以正常访问了 阅读全文
posted @ 2022-05-13 16:20 淫鬻 阅读(246) 评论(0) 推荐(0) 编辑
摘要:1.首先是fiddler端设置Option-connections中勾选Allow remote computers to connect允许电脑远程连接 2.win+R 窗口输入ipconfig 得到电脑的DNS地址,查看 无线局域网适配器WALN 下面的IPv4地址 3.手机端连WiFi(电脑手 阅读全文
posted @ 2022-05-13 15:57 淫鬻 阅读(181) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriverfrom time import sleepfrom selenium.webdriver import ActionChainsfrom selenium.webdriver.common.keys import Keysdriver = 阅读全文
posted @ 2022-05-06 02:11 淫鬻 阅读(15) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriverfrom time import sleepfrom selenium.webdriver import ActionChainsdriver = webdriver.Firefox()action = ActionChains(drive 阅读全文
posted @ 2022-05-06 01:47 淫鬻 阅读(11) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriverfrom time import sleepdriver = webdriver.Firefox()URL = r"C:\Users\I\Desktop\注册A.html"driver.get(URL)driver.find_element 阅读全文
posted @ 2022-05-06 01:21 淫鬻 阅读(25) 评论(0) 推荐(0) 编辑
摘要:CSS定位: id 前面加# class 前面加. from selenium import webdriverfrom time import sleepdriver = webdriver.Firefox()URL = r"C:\Users\I\Desktop\注册A.html"driver.g 阅读全文
posted @ 2022-05-06 00:54 淫鬻 阅读(40) 评论(0) 推荐(0) 编辑
摘要:from selenium import webdriverfrom time import sleepdriver = webdriver.Firefox()# driver = webdriver.Chrome()URL = r"C:\Users\I\Desktop\注册A.html"drive 阅读全文
posted @ 2022-05-06 00:24 淫鬻 阅读(69) 评论(0) 推荐(0) 编辑
摘要:# 导包 from selenium import webdriver from time import sleep # 加载driver driver = webdriver.Firefox() # 打开URL页面 URL = r"C:\Users\I\Desktop\注册A.html" driv 阅读全文
posted @ 2022-05-05 20:26 淫鬻 阅读(81) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示