1 Star 0 Fork 0

CherryDady/wechat-ai-assistant

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_api.py 476 Bytes
一键复制 编辑 原始数据 按行查看 历史
unknown 提交于 2025-02-20 15:53 +08:00 . Update project files and add .gitignore
import requests
url = "https://www.36kr.com/api/newsflash"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Accept": "application/json"
}
try:
response = requests.get(url, headers=headers)
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text[:200]}...") # 只打印前200个字符
except Exception as e:
print(f"Error: {str(e)}")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/cherrydady/wechat-ai-assistant.git
git@gitee.com:cherrydady/wechat-ai-assistant.git
cherrydady
wechat-ai-assistant
wechat-ai-assistant
master

搜索帮助