You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pasting that into a browser gives an error saying "The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used."
Looks like they're doing stupid user-agent filtering, as passing a different user-agent header returns a 200 response.
Seems any user-agent string with 'curl' or 'python' (or 'ruby', even) in it results in a 403:
$ printf '%-32s %s\n' user-agent response; for agent in web-enabled-hair-{straighteners,curlers} 'some script written in '{ruby,python,bash} ; do printf '%-32s ' "${agent}"; curl -s -o /dev/null -w '%{http_code}\n' -A "$agent" 'https://lewisham.gov.uk/myservices/recycling-and-rubbish/your-bins/collection' ; d
one
user-agent response
web-enabled-hair-straighteners 200
web-enabled-hair-curlers 403
some script written in ruby 403
some script written in python 403
some script written in bash 200
Source (if relevant)
lewisham_gov_uk
Logs
no relevant logs
Relevant Configuration
No response
Checklist Source Error
Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
Checked that the website of your service provider is still working
Tested my attributes on the service provider website (if possible)
I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)
Checklist Sensor Error
Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)
Required
I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
The text was updated successfully, but these errors were encountered:
I Have A Problem With:
A specific source
What's Your Problem
Trying to configure the source with UPRN, I get this error:
Pasting that URL into a browser works fine.
Trying postcode+number instead of UPRN, I get the same error with a different URL:
Pasting that into a browser gives an error saying "The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used."
Trying either URL via
curl
I get a 403, eg:Looks like they're doing stupid user-agent filtering, as passing a different user-agent header returns a 200 response.
Seems any user-agent string with 'curl' or 'python' (or 'ruby', even) in it results in a 403:
Source (if relevant)
lewisham_gov_uk
Logs
Relevant Configuration
No response
Checklist Source Error
Checklist Sensor Error
Required
The text was updated successfully, but these errors were encountered: