manuzhang / mkdocs-htmlproofer-plugin

A MkDocs plugin that validates URL in rendered html files
MIT License
41 stars 16 forks source link

request headers #44

Closed normanlorrain closed 1 year ago

normanlorrain commented 1 year ago

In my docs I link to an external web site that always give a 404 with the plugin (I'm guessing it's a bot mitigation). I narrowed down what it seems to need with this example:

import requests

url = 'https://www.imhpromotion.ca'
print(requests.get(url=url))
print(requests.get(url=url,headers={'Accept-Language': 'en-US,en;q=0.9'}))

It would be nice to be able to customise the header.

I should probably use the raise_error_excludes setting, but would like to know if that site goes down.

manuzhang commented 1 year ago

Thanks, I think I will set the Accept-Language to * for any language.

manuzhang commented 1 year ago

@normanlorrain it should be fixed in 0.10.2