Closed asontha closed 1 year ago
Here's how these are being called in the script
let site_map_response = await fetchSiteMapXML(site_map_url);
let site_map_json = await convertXMLToJSON(site_map_response.data);
console.log("Sitemap JSON: ", site_map_json);
site_urls = site_map_json.urlset.url.map(u => u.loc[0])
Turns out the website had a special bot blocker on their sitemap.
Hey! I have a script that loads sitemaps, and then uses xml2js to convert them into JSON for use. Previously it worked just fine, but now I seem to always be getting an unexpected close tag. Did something change? I recently tried upgrading to 0.5.0 to see if that would fix it but still running into the same issue.
Sitemap url: https://www.zurichna.com/sitemap.xml
Version ^0.4.23
Version ^0.5.0
Here's how I'm using xml2js:
The output of
fetchSiteMapXML
is fed directly intoconvertXMLToJSON
.