OMG! Its hard to believe that a single 'w' can jeopardize your entire program! Thanks :)
On Sunday, December 22, 2019 at 6:10:50 PM UTC+5:30, Antonio Alvarez Ramirez wrote:
-- On Sunday, December 22, 2019 at 6:10:50 PM UTC+5:30, Antonio Alvarez Ramirez wrote:
Hello ,You add four wwww !!! ;-) try yo remove oneBye , and have nice dayEl 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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/faf5b423-1002-4544-93db-3af9d30fb147%40googlegroups.com.
No comments:
Post a Comment