【发布时间】:2018-09-24 18:06:07
【问题描述】:
我想知道当我尝试向这个 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,在这种情况下,我能做些什么来解决这个问题并解析该网站的内容?非常感谢!
【问题讨论】:
-
我无法复制错误,它对我来说打印得很好
-
@roganjosh 真的吗?也许这是我的设置。
-
你的网址有问题,有两个
https://!! -
@stovfl 我已经尝试不使用第二个 https 但仍然无法正常工作
标签: python beautifulsoup python-requests