|

楼主 |
发表于 2024-5-5 10:01:25
|
显示全部楼层
@FishC
- import requests,json
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
- url='http://www.6002255.com/'
- data={
- "input": '最后一页',#input('歌曲名:'),
- "filter": "name",
- "type": "lizhi",
- "page": "1"
- }
- response=json.loads(requests.post(url,headers=headers,data=data))
- print(response)
复制代码
- Traceback (most recent call last):
- File "C:\Users\shuoguo-win10\Desktop\333.py", line 11, in <module>
- response=json.loads(requests.post(url,headers=headers,data=data))
- File "C:\Users\shuoguo-win10\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 339, in loads
- raise TypeError(f'the JSON object must be str, bytes or bytearray, '
- TypeError: the JSON object must be str, bytes or bytearray, not Response
复制代码
|
|