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(
5858 return set ()
5959
6060 try :
61- text = requests .get (url , headers = { "User-Agent" : _FAKE_USER_AGENT } ).text
61+ text = requests .get (url ).text
6262 except requests .exceptions .ConnectionError as error :
6363 reason = "" if error is None else " - {error.errno}"
6464 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:
155155_JS_GENERAL_EXPORT_PATTERN = re .compile (
156156 r"(?:^|;|})\s*export(?=\s+|{)(.*?)(?=;|$)" , re .MULTILINE
157157)
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