python - 为什么我得到这个 ERRNO 110 - python 请求
问题描述
我想知道当我尝试向这个 URL 发出请求时出现了什么问题。这是我的代码:
import requests as rq
from bs4 import BeautifulSoup
def make_request(Url):
result = rq.get(Url)
soup = BeautifulSoup(result.content, "html.parser")
events = soup.find_all("a")
for i in events:
print(i)
make_request("https://web.archive.org/web/20180507100019/https://bravenewcoin.com/industry-resources/events-calendar/bitcoin-and-blockchain-events/")
我认为问题在于 URL,在这种情况下,我能做些什么来解决这个问题并解析该网站的内容?非常感谢 !
解决方案
您的函数中有两个网址,
https://web.archive.org/web/20180507100019/
https://bravenewcoin.com/industry-resources/events-calendar/bitcoin-and-blockchain-events/
请一次提供一个网址。
推荐阅读
- javascript - 如何将 JSON 文件转换为数组列表
- ios - 使用 CATextLayers 向圆添加标签
- django - 有效地从 ManyToManyField 检索并添加到 ManyToManyField
- tensorflow - 张量流中具有分类分布的集成网络
- while-loop - 这两个循环有什么区别?
- xpath - html.fromstring() 和 etree.fromstring() 生成的树的差异
- java - 一维排序数组,但 array[i+1] 总是打印索引为零的元素
- excel - 在 VBA 中使用 .NET HashTable 返回类型
- swiftui - SwiftUI @State var 初始化问题
- python - discord.py-rewrite - 如何获得会员的加入排名?