摘要: import requests #构造url url = 'https://api.asilu.com/today' #发送请求 response = requests.get(url) #以text形式返回 page_text = response.text #存储在指定文件中 with open 阅读全文
posted @ 2022-06-13 19:57 淫鬻 阅读(79) 评论(0) 推荐(0) 编辑
摘要: import unittest import requests # 登录请求,断言 class testzylogin(unittest.TestCase): @classmethod def setUpClass(self): # 定义请求地址url,请求参数data,请求结果result sel 阅读全文
posted @ 2022-06-13 19:33 淫鬻 阅读(10) 评论(0) 推荐(0) 编辑
摘要: import unittest import requests import re import json # 第一步:截取usersession,传递到请求参数paras里面 url1 = "http://127.0.0.1:1080/cgi-bin/nav.pl?in=home " sessio 阅读全文
posted @ 2022-06-13 17:38 淫鬻 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 安装教程: https://www.yisu.com/zixun/293100.html 可以直接安装在win10里面(切记webtours和strawberry-perl-5.10.1.0.msi都要安装,不然会报错,之前就是少了strawberry,不能使用) 在winserver2003里面安 阅读全文
posted @ 2022-06-13 17:33 淫鬻 阅读(140) 评论(0) 推荐(0) 编辑
摘要: import requests URL = "https://api.seniverse.com/v3/weather/now.json?" city = '北京' param = { "location": city, "key": "SCYrvkytJze9qyzOh" } # 第一种,使用ge 阅读全文
posted @ 2022-06-13 16:14 淫鬻 阅读(182) 评论(0) 推荐(0) 编辑