fix(core): update
This commit is contained in:
@@ -59,4 +59,23 @@ export class SmartSitemap {
|
||||
}
|
||||
return sitemapWebsite.exportSitemapXml();
|
||||
}
|
||||
|
||||
/**
|
||||
* parses a sitemap url
|
||||
*/
|
||||
public async parseSitemapUrl(urlArg: string) {
|
||||
const sitemapXml = await (await (new plugins.webrequest.WebRequest()).request(urlArg, {
|
||||
method: 'GET'
|
||||
})).text();
|
||||
|
||||
const parsedSitemap = await this.parseSitemap(sitemapXml);
|
||||
return parsedSitemap;
|
||||
}
|
||||
|
||||
/**
|
||||
* parses a sitemap
|
||||
*/
|
||||
public async parseSitemap(sitemapXmlArg: string) {
|
||||
return (new plugins.smartxml.SmartXml()).parseXmlToObject(sitemapXmlArg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user