Repository: manuzhang/mkdocs-htmlproofer-plugin

Issue:
Visual Studio Marketplace URLs cause an "invalid url" [404] error
When the URL of a VS Code extension on the Visual Studio Marketplace is referenced in a document, the plugin causes mkdocs to fail with an "invalid url" [404] error.

**To Reproduce**
Create a document, **index.md**, with the following line of markdown
```
Check out [this site](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
```

Run `mkdocs build`, which produces the following output:
```
ERROR    -  Error building page 'index.md':
ERROR    -  invalid url - https://marketplace.visualstudio.com/items?itemName=ms-python.python [404] [index.md]
```

**Environment (please complete the following information):**
- OS: Ubuntu 22.04
- Python version: 3.10.6
- mkdocs version: 1.4.0
- mkdocs-htmlproofer-plugin version: 0.10.0

Contents of `mkdocs.yml`:

```yaml
site_name: Test
plugins:
    - htmlproofer:
        raise_error: true
```


Discussion:
manuzhang: @johnthagen please help review this PR.

Patch:
diff --git a/htmlproofer/plugin.py b/htmlproofer/plugin.py
index cb67b70..48c816e 100644
--- a/htmlproofer/plugin.py
+++ b/htmlproofer/plugin.py
@@ -87,7 +87,7 @@ class HtmlProoferPlugin(BasePlugin):
     @lru_cache(maxsize=1000)
     def get_external_url(self, url: str) -> int:
         try:
-            response = self._session.head(url, timeout=URL_TIMEOUT)
+            response = self._session.get(url, timeout=URL_TIMEOUT)
             return response.status_code
         except requests.exceptions.Timeout:
             return 504


Test patch:
diff --git a/tests/integration/docs/page4.md b/tests/integration/docs/page4.md
index a21dad1..31957da 100644
--- a/tests/integration/docs/page4.md
+++ b/tests/integration/docs/page4.md
@@ -1,1 +1,4 @@
 ## Section One
+
+
+[This site](https://marketplace.visualstudio.com/items?itemName=ms-python.python) doesn't work with `HEAD` requests.
\ No newline at end of file
diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py
index 981ec84..1ef9b2e 100644
--- a/tests/unit/test_plugin.py
+++ b/tests/unit/test_plugin.py
@@ -24,7 +24,7 @@ def empty_files():
 
 @pytest.fixture(autouse=True)
 def mock_requests():
-    with patch('requests.Session.head') as mock_head:
+    with patch('requests.Session.get') as mock_head:
         mock_head.side_effect = Exception("don't make network requests from tests")
         yield mock_head