首页 > 解决方案 > 为什么我得到这个 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,在这种情况下,我能做些什么来解决这个问题并解析该网站的内容?非常感谢 !

标签: pythonbeautifulsouppython-requests

解决方案


您的函数中有两个网址,

https://web.archive.org/web/20180507100019/
https://bravenewcoin.com/industry-resources/events-calendar/bitcoin-and-blockchain-events/

请一次提供一个网址。


推荐阅读