Web Scraper does not support application/xml Type #3513
Replies: 1 comment
-
To address the issue of the Dify web scraper module not supporting the
Here's a snippet to illustrate how you might modify the def get_url(url: str, user_agent: str = None) -> str:
headers = {"User-Agent": user_agent or "default_user_agent"}
supported_content_types = ["text/html", "application/xml"]
# Fetch and process the URL content here, checking against supported_content_types
# Include logic for handling application/xml content This modification ensures that URLs with content type Remember, the key is to ensure that your scraper can recognize and process Sources
|
Beta Was this translation helpful? Give feedback.
-
Self Checks
Dify version
0.6.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Hey Guys,
ive tried to call a rss feed (xml) with the webscraper module.
How can i fix this?
Input
Output:
✔️ Expected Behavior
a success call
❌ Actual Behavior
application/xml Type is not supported
Beta Was this translation helpful? Give feedback.
All reactions