diff --git a/book.cmn-Hant-TW/podcasts.js b/book.cmn-Hant-TW/podcasts.js index 5f05a0b6..19f19ff5 100644 --- a/book.cmn-Hant-TW/podcasts.js +++ b/book.cmn-Hant-TW/podcasts.js @@ -99,26 +99,70 @@ var crawler = new CeL.work_crawler({ return work_data; }, - get_chapter_list : function(work_data, html, get_label) { + pre_get_chapter_list : function(callback, work_data, html, get_label) { //
//

目录

- var data = html.between(' id="shoebox-media-api-cache-amp-podcasts">', - ''); - data = JSON.parse(data); - data = data[Object.keys(data)[0]]; - data = JSON.parse(data); - data = data.d; - data = data[0]; - data = data.relationships.episodes.data; - // console.trace(data, Object.keys(data)); - - data.forEach(function(chapter_data) { + var episodes_data = html.between( + ' id="shoebox-media-api-cache-amp-podcasts">', ''); + episodes_data = JSON.parse(episodes_data); + episodes_data = episodes_data[Object.keys(episodes_data)[0]]; + episodes_data = JSON.parse(episodes_data); + episodes_data = episodes_data.d; + episodes_data = episodes_data[0]; + episodes_data = episodes_data.relationships.episodes; + // console.trace(episodes_data); + + // reset work_data.chapter_list + work_data.chapter_list = episodes_data.data; + // console.log(work_data.chapter_list); + + // console.trace(work_data); + var environment = html.between( + '