fix(plugins): fpw parsers for JSON API, mirrors, and looser HTML

- fpw_proxy_list_download: parse JSON list/proxies bodies; jsDelivr monosans tier; crawl timeout 300s
- fpw_socks_ssl: try parse_html_table before regex
- fpw_hidemy: loose row scan when fixed columns fail
- fpw_proxynova: plain IP/port row fallback
- fpw_spys_one: HTTPS endpoints; crawl timeout 180s
- fpw_gatherproxy: HTTPS + extra JSON key patterns
- fpw_checkerproxy: lower min HTML length for parse
- fpw_premproxy: ip:port regex fallback when few table rows

Made-with: Cursor
This commit is contained in:
祀梦
2026-04-05 14:16:03 +08:00
parent a26ae50051
commit e582067316
8 changed files with 193 additions and 17 deletions

View File

@@ -26,7 +26,7 @@ class FpwSocksSslProxyPlugin(BaseHTTPPlugin):
def _parse_page(self, html: str, default_protocol: str) -> List[ProxyRaw]:
results = []
pattern = re.compile(
r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})</td>\s*<td[^>]*>\s*(\d+)",
r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})</td>\s*<td[^>]*>\s*(\d{1,5})",
re.I,
)
for ip, port in pattern.findall(html):
@@ -47,7 +47,11 @@ class FpwSocksSslProxyPlugin(BaseHTTPPlugin):
proto = "socks4"
else:
proto = "http"
batch = self._parse_page(html, proto)
batch = self.parse_html_table(
html, column_map={"ip": 0, "port": 1}, protocol=proto
)
if not batch:
batch = self._parse_page(html, proto)
results.extend(batch)
if batch:
logger.info(f"{self.display_name} {url}: {len(batch)}")