获取豆瓣https://movie.douban.com/top250的,第一页前25个电影名字 我的答案: import requests from bs4 import BeautifulSoup head={"user-agent": "Mozilla/5.0 (Windows NT 10.0 ...
分类:
编程语言 时间:
2021-01-11 11:30:43
阅读次数:
0
使用浏览器看到返回的数据是类似下图中的: 可以看到是xml格式的 解析方式: from xlml import html ... ret = requests.get(url, headers=headers) tree = html.fromstring(ret.content) navareas ...
分类:
编程语言 时间:
2021-01-08 10:34:32
阅读次数:
0
仅供个人学习研究使用 from Crypto.Cipher import AES # 非对称加密 import rsa # 对成加密 import execjs # PyExecJs可以使用Python模拟运行js代码 import base64 import requests first_para ...
分类:
其他好文 时间:
2021-01-07 12:42:58
阅读次数:
0
1 数据源 知乎 话题『美女』下所有问题中回答所出现的图片 2 抓取工具 Python 3,并使用第三方库 Requests、lxml、AipFace,代码共 100 + 行 3 必要环境 Mac / Linux / Windows (Linux 没测过,理论上可以。Windows 之前较多反应出现 ...
分类:
编程语言 时间:
2021-01-06 12:10:20
阅读次数:
0
爬取内容为 该图片下的七个分类, 然后对应的每个种类的书本信息(摘要和目录) 效果为 代码如下 import requests from bs4 import BeautifulSoup import re import time from selenium import webdriver fro ...
分类:
编程语言 时间:
2021-01-01 12:57:34
阅读次数:
0
自动化测试 python+selenium+unittest+htmlTestrunner python+appium+unittest+htmlTestRunner python+request+unittest+htmlTestRunner+Excel文档 接口文档(excel表格中) 测试开发 ...
分类:
其他好文 时间:
2020-12-29 11:38:13
阅读次数:
0
#导入requests库 #第一次需要安装:pip install requests import requests #测试天气预报接口,发送Get请求,查看返回的JSON结果 #提供请求的URL地址 url = 'http://apis.juhe.cn/simpleWeather/query' # ...
分类:
其他好文 时间:
2020-12-25 11:43:04
阅读次数:
0
# -*- coding: utf-8 -*- import bs4 import requests from bs4 import BeautifulSoup import pandas as pd import matplotlib.pyplot as plt def getHTMLText(u ...
分类:
Web程序 时间:
2020-12-19 13:08:52
阅读次数:
2
import requests from bs4 import BeautifulSoup import bs4 def getHTMLText(url): try: r = requests.get(url,timeout=30) r.raise_for_status() # 如果状态不是200, ...
分类:
其他好文 时间:
2020-12-19 12:33:55
阅读次数:
1
postman接口参数依赖是指提取前面接口返回的数据,作为后续接口使用的参数 postman requests请求的tests标签中 var data = JSON.parse(responseBody); // 解析接口返回结果,把数据序列化成一个json对象,这个时候 data 就是接口返回的j ...
分类:
其他好文 时间:
2020-12-19 12:10:12
阅读次数:
2