Thanks Karan
On Sunday, December 22, 2019 at 7:14:00 PM UTC+5:30, Karan Mittal wrote:
-- On Sunday, December 22, 2019 at 7:14:00 PM UTC+5:30, Karan Mittal wrote:
Hey Aryan, Hope this helps.Regards,Karan MittalOn Sun, Dec 22, 2019 at 6:10 PM Antonio Alvarez Ramirez <aalv...@proservic.net> wrote:Hello ,You add four wwww !!! ;-) try yo remove oneBye , and have nice day--El dom., 22 dic. 2019 8:55, Aaryan Dewan <dewan...@gmail.com> escribió:--I was making a simple django application in which it will lookup to google.com and display all the links. Here's some of the code( that's causing the error ):from django.shortcuts importrender, HttpResponse import requestsfrom bs4 import BeautifulSoupdef scrape(request):page = requests.get('https://wwww.google.com ')soup = BeautifulSoup(page.text, 'html.parser') ...When I try to run the local Django server and open localhost:8000 I get this error:ConnectionError at /HTTPSConnectionPool(host='wwww.google.com ',port=443): Max retries exceeded with url: / (Caused byNewConnectionError('<urllib3.connection. VerifiedHTTPSConnection object at 0x056BFB50>: Failed to establish a new connection: [Errno 11001]getaddrinfo failed'))On the other hand, if I try running `page = requests.get("https://www.google.com ")` on a python shell in the command prompt, it works fine with no errors.I tried to use `time.sleep` as it was mentioned in some SE answer but that did not help. So how should I go about fixing this?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7353725f- .ae5c-4756-9cf3-67e1e1dfc449% 40googlegroups.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ .CAMuDJBKzwz2RrWRfmft5hChSH_ VhXpLNYy0WKWDBu8Ny5xQCsw% 40mail.gmail.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/13d57d54-3c35-4d5f-abdf-c0cfdeff4905%40googlegroups.com.
No comments:
Post a Comment