More HTML support
This commit is contained in:
parent
afd9f43e28
commit
fbf66d9a19
7
index.ts
7
index.ts
@ -13,7 +13,7 @@ app.use(async (ctx) => {
|
||||
const { data } = await Axios.get(
|
||||
"https://podcast.midline.pl/api/v1/channels/Midline/rss"
|
||||
);
|
||||
const builder = new xml2js.Builder();
|
||||
const builder = new xml2js.Builder({ cdata: true });
|
||||
const parsed_data = await xml2js.parseStringPromise(data);
|
||||
|
||||
parsed_data.rss.channel[0]["itunes:explicit"] = "false";
|
||||
@ -58,10 +58,7 @@ app.use(async (ctx) => {
|
||||
delete item["guid"][0].$.isPermalink;
|
||||
item["itunes:subtitle"][0] = trim(item["itunes:subtitle"][0], 255);
|
||||
item["itunes:explicit"][0] = "false";
|
||||
item["itunes:summary"][0] = item["itunes:summary"][0].replace(
|
||||
/(<([^>]+)>)/gi,
|
||||
""
|
||||
);
|
||||
item["itunes:summary"][0] = item["itunes:summary"][0];
|
||||
if (item["title"][0].match(/#[0-9]*/)[0].substring(1) !== "0") {
|
||||
try {
|
||||
last_index = item["title"][0]
|
||||
|
Loading…
Reference in New Issue
Block a user