Do check out the project. I have it on this github link.
https://github.com/Karan-S-Mittal/DataFlair-News-Aggregator
Its a news scrapper using requests and bs4.

On Sun, Dec 22, 2019 at 7:12 PM Karan Mittal <karanshyammit...@gmail.com>
wrote:

> Hey Aryan, Hope this helps.
> [image: sublime_text_RnE1W8IKhx.png]
> Regards,
> Karan Mittal
>
>
> On Sun, Dec 22, 2019 at 6:10 PM Antonio Alvarez Ramirez <
> aalva...@proservic.net> wrote:
>
>> Hello ,
>>
>> You add four wwww !!! ;-) try yo remove one
>>
>> Bye , and have nice day
>>
>> El dom., 22 dic. 2019 8:55, Aaryan Dewan <dewanaar...@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 import render, HttpResponse
>>> import requests
>>> from bs4 import BeautifulSoup
>>>
>>> def 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 <http://wwww.google.com>',*
>>> *port=443): Max retries exceeded with url: / (Caused by*
>>> *NewConnectionError('<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-users+unsubscr...@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
>>> <https://groups.google.com/d/msgid/django-users/7353725f-ae5c-4756-9cf3-67e1e1dfc449%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMuDJBKzwz2RrWRfmft5hChSH_VhXpLNYy0WKWDBu8Ny5xQCsw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMuDJBKzwz2RrWRfmft5hChSH_VhXpLNYy0WKWDBu8Ny5xQCsw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO24gqwY%2BsSG%3DKgUf3Hcq%2BG9mL0KRm-BGwWp4ax60ZMr8uz9FA%40mail.gmail.com.

Reply via email to