We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0621716 commit 80e7141Copy full SHA for 80e7141
1 file changed
src/idom/web/utils.py
@@ -58,7 +58,7 @@ def resolve_module_exports_from_url(
58
return set()
59
60
try:
61
- text = requests.get(url, headers={"User-Agent": _FAKE_USER_AGENT}).text
+ text = requests.get(url).text
62
except requests.exceptions.ConnectionError as error:
63
reason = "" if error is None else " - {error.errno}"
64
logger.warning("Did not resolve exports for url " + url + reason)
@@ -155,8 +155,3 @@ def _resolve_relative_url(base_url: str, rel_url: str) -> str:
155
_JS_GENERAL_EXPORT_PATTERN = re.compile(
156
r"(?:^|;|})\s*export(?=\s+|{)(.*?)(?=;|$)", re.MULTILINE
157
)
158
-
159
-# we fake the user agent to bypass some bot blockers
160
-_FAKE_USER_AGENT = (
161
- "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion"
162
-)
0 commit comments