Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Strip out the scheme from the server address URI
Kshitij Jande2a9ab69f4b4c
diff --git a/scrapegraphai/utils/proxy_rotation.py b/scrapegraphai/utils/proxy_rotation.pyindex 9938f168..07e04d0f 100644--- a/scrapegraphai/utils/proxy_rotation.py+++ b/scrapegraphai/utils/proxy_rotation.py@@ -4,6 +4,7 @@ Module for rotating proxiesimport ipaddressimport random+import refrom typing import List, Optional, Set, TypedDictimport requests@@ -230,7 +231,7 @@ def parse_or_search_proxy(proxy: Proxy) -> ProxySettings:"""assert "server" in proxy, "missing server in the proxy configuration"- server_address = proxy["server"].split(":", maxsplit=1)[0]+ server_address = re.sub(r'^\w+://', '', proxy["server"]).split(":", maxsplit=1)[0]if is_ipv4_address(server_address):return _parse_proxy(proxy)