wet-mcp 1.2.1__py3-none-any.whl → 1.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -288,10 +288,21 @@ async def download_media(
288
288
 
289
289
  results = []
290
290
 
291
- async with httpx.AsyncClient(timeout=60) as client:
291
+ transport = httpx.AsyncHTTPTransport(retries=3)
292
+ headers = {
293
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
294
+ }
295
+
296
+ async with httpx.AsyncClient(
297
+ timeout=60, transport=transport, headers=headers
298
+ ) as client:
292
299
  for url in media_urls:
293
300
  try:
294
- response = await client.get(url)
301
+ # Handle protocol-relative URLs
302
+ if url.startswith("//"):
303
+ url = f"https:{url}"
304
+
305
+ response = await client.get(url, follow_redirects=True)
295
306
  response.raise_for_status()
296
307
 
297
308
  filename = url.split("/")[-1].split("?")[0] or "download"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wet-mcp
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: Open-source MCP Server thay thế Tavily - Web search, extract, crawl với SearXNG
5
5
  Project-URL: Homepage, https://github.com/n24q02m/wet-mcp
6
6
  Project-URL: Repository, https://github.com/n24q02m/wet-mcp.git
@@ -11,10 +11,10 @@ wet_mcp/docs/help.md,sha256=K91uveU6hM_tWBR9iqgn6_g0rt9h1h2zyEA3RMefeks,1428
11
11
  wet_mcp/docs/media.md,sha256=NPgHqUvjncIjc7hieZnka5cvlcrfBWgjSVxompBxizY,1279
12
12
  wet_mcp/docs/web.md,sha256=Ts7hBo_TEBcfT10iscag9-PxAKUkhhiaywricUTj3to,1691
13
13
  wet_mcp/sources/__init__.py,sha256=NzIac1ha0nZR93Uivsq0GqBxdJrfm0q83IQAPeip4I4,42
14
- wet_mcp/sources/crawler.py,sha256=9h8b46hqQ7IAncRZvzc6BdEyzib8Xhogt0J3KhIM_5Q,9905
14
+ wet_mcp/sources/crawler.py,sha256=PwkxQnAvkoW6kA9LnPW0f8d5ETzVYTWeRKtntNP24cc,10322
15
15
  wet_mcp/sources/searxng.py,sha256=147yRT75vD2E5GdvYceoTqGRTqqCo8W1tpjXsZRaUhw,2029
16
- wet_mcp-1.2.1.dist-info/METADATA,sha256=1jNB7XD2VkqjqGAbh8Oc0SLCIDNWKgq271k3PgRZExg,6531
17
- wet_mcp-1.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
- wet_mcp-1.2.1.dist-info/entry_points.txt,sha256=MvjtmQDh--zOPfnE-21Q861RFRLkE1xDbcTGAgURT_Y,41
19
- wet_mcp-1.2.1.dist-info/licenses/LICENSE,sha256=d7xQ6sRyeGus6gnvwgqiQtSY7XdFw0Jd0w5-Co_xHnk,1064
20
- wet_mcp-1.2.1.dist-info/RECORD,,
16
+ wet_mcp-1.3.0.dist-info/METADATA,sha256=bmxh46pW33oJIc3UZVxTmv3UDD5jyAIrOliNXND_wwc,6531
17
+ wet_mcp-1.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
+ wet_mcp-1.3.0.dist-info/entry_points.txt,sha256=MvjtmQDh--zOPfnE-21Q861RFRLkE1xDbcTGAgURT_Y,41
19
+ wet_mcp-1.3.0.dist-info/licenses/LICENSE,sha256=d7xQ6sRyeGus6gnvwgqiQtSY7XdFw0Jd0w5-Co_xHnk,1064
20
+ wet_mcp-1.3.0.dist-info/RECORD,,