File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def resolve_module_exports_from_url(
58
58
return set ()
59
59
60
60
try :
61
- text = requests .get (url , headers = { "User-Agent" : _FAKE_USER_AGENT } ).text
61
+ text = requests .get (url ).text
62
62
except requests .exceptions .ConnectionError as error :
63
63
reason = "" if error is None else " - {error.errno}"
64
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
155
_JS_GENERAL_EXPORT_PATTERN = re .compile (
156
156
r"(?:^|;|})\s*export(?=\s+|{)(.*?)(?=;|$)" , re .MULTILINE
157
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
- )
You can’t perform that action at this time.
0 commit comments