Skip to content

Commit

Permalink
Prevent error if name and url not found in a episodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuros-charm authored Nov 24, 2023
1 parent 76ee19d commit d14d6c6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions repo/anime.girigirilove.com.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ export default class extends Extension {
playListTitle.forEach((element, index)=>{
const stream_title = element.match(/>&nbsp;(.+?)</)[1]
const ep_list = playListArea[index].match(/<li[\s\S]+?<\/li>/g).map((ep_element) => {
return{
name:ep_element.match(/>(\w+)</)[1],
url:ep_element.match(/href="(.+?)"/)[1]
}
})
return {
name: ep_element.match(/>(\w+)</)?.[1],
url: ep_element.match(/href="(.+?)"/)?.[1]
}
}).filter(episodes => episodes.name && episodes.url);
episodes.push({
title:stream_title,
urls:ep_list
Expand Down Expand Up @@ -152,4 +152,4 @@ export default class extends Extension {
console.log(m3u8_link)
return m3u8_link
}
}
}

0 comments on commit d14d6c6

Please sign in to comment.