0

I want to know what is the problem when I try to make a request to this URL. Here is my code:

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/") 

I think the problem is the URL, in that case what can I do to solve this and parse the content of that website ? Thanks a lot !

8
  • I cannot replicate the error, it prints just fine for me Commented Sep 24, 2018 at 18:07
  • See here and here. The problem appears to be on your end Commented Sep 24, 2018 at 18:09
  • @roganjosh Reaally? maybe It's my setup. Commented Sep 24, 2018 at 18:18
  • Your url ist faulty, there are two https://!! Commented Sep 24, 2018 at 18:22
  • @stovfl I already tried without the second https and still not working Commented Sep 24, 2018 at 18:41

2 Answers 2

0

There are two urls in your function,

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

please provide one url at a time.

Sign up to request clarification or add additional context in comments.

Comments

0

You can request two url once.you appear to need this

urls = [ "https://web.archive.org/web/20180507100019/", "https://bravenewcoin.com/industry-resources/events-calendar/bitcoin-and-blockchain-events/"] for url in urls: make_request(url) 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.