Thanks Mike that worked.
Strange way to go about things though from the Met Office. They did tell me
Datapoint is to be replaced by DataHub. Perhaps its there way of changing.
Thanks again Phil

On Sun, 1 Mar 2020, 17:36 Mike Hawkins, <[email protected]> wrote:

> Hi, yes, sorry the last email was a bit of a dump and run as I was in a
> hurry.
>
> I have attached a forecast.py file with the two added and one modified
> line.  This is at line 3280.  I have changed
>
>             try:
>                 response = urllib2.urlopen(u)
>                 return response.read()
>
>
>
> to:
>             try:
>                 req = urllib2.Request(u)
>                 req.add_header('User-Agent', 'Mozilla/5.0')
>                 response = urllib2.urlopen(req)
>                 return response.read()
>
>
> the file to edit or replace is user/forecast.py.  The shorter user-agent
> seems to work just as well as the longer one.
>
> Hope it works for you
>
> Mike
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/6ef7dbb2-b6cf-45b6-9eb8-dc07cef5930c%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/6ef7dbb2-b6cf-45b6-9eb8-dc07cef5930c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CALTQ7pNF10UhLUv5Vp7acEbiGBZpw9ReE9CTpfs8eYSgZNi99Q%40mail.gmail.com.

Reply via email to