Repository: scrapy/w3lib

Issue:
Function `convert_entity` does not catch `OverflowError` 
Error:
```
OverflowError
Python int too large to convert to C int
```

`w3lib` version -> `2.0.1`
`Python` version -> `3.8.13`

<img width="1131" alt="Screenshot 2022-10-31 at 10 02 22" src="https://user-images.githubusercontent.com/107861298/198971171-1af35f01-42d2-413a-8c47-9d2c3dc6ece1.png">


Discussion:

Patch:
diff --git a/w3lib/html.py b/w3lib/html.py
index a31d42b..0cff2ff 100644
--- a/w3lib/html.py
+++ b/w3lib/html.py
@@ -91,7 +91,7 @@ def replace_entities(
                     return bytes((number,)).decode("cp1252")
                 else:
                     return chr(number)
-            except ValueError:
+            except (ValueError, OverflowError):
                 pass
 
         return "" if remove_illegal and groups.get("semicolon") else m.group(0)


Test patch:
diff --git a/tests/test_html.py b/tests/test_html.py
index 1e637b0..1cabf6d 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -65,6 +65,10 @@ class RemoveEntitiesTest(unittest.TestCase):
         self.assertEqual(replace_entities("x&#x2264;y"), "x\u2264y")
         self.assertEqual(replace_entities("x&#157;y"), "xy")
         self.assertEqual(replace_entities("x&#157;y", remove_illegal=False), "x&#157;y")
+        self.assertEqual(replace_entities("&#82179209091;"), "")
+        self.assertEqual(
+            replace_entities("&#82179209091;", remove_illegal=False), "&#82179209091;"
+        )
 
     def test_browser_hack(self):
         # check browser hack for numeric character references in the 80-9F range