diff --git a/Module Parser KETSU/SenManga/.DS_Store b/Module Parser KETSU/SenManga/.DS_Store new file mode 100644 index 0000000..bb30730 Binary files /dev/null and b/Module Parser KETSU/SenManga/.DS_Store differ diff --git a/Module Parser KETSU/SenManga/Chapters/.DS_Store b/Module Parser KETSU/SenManga/Chapters/.DS_Store new file mode 100644 index 0000000..e932f2c Binary files /dev/null and b/Module Parser KETSU/SenManga/Chapters/.DS_Store differ diff --git a/Module Parser KETSU/SenManga/Chapters/Chapters.html b/Module Parser KETSU/SenManga/Chapters/Chapters.html new file mode 100644 index 0000000..c09ad1d --- /dev/null +++ b/Module Parser KETSU/SenManga/Chapters/Chapters.html @@ -0,0 +1,87 @@ + + diff --git a/Module Parser KETSU/SenManga/Info/.DS_Store b/Module Parser KETSU/SenManga/Info/.DS_Store new file mode 100644 index 0000000..0522256 Binary files /dev/null and b/Module Parser KETSU/SenManga/Info/.DS_Store differ diff --git a/Module Parser KETSU/SenManga/Info/Info.html b/Module Parser KETSU/SenManga/Info/Info.html new file mode 100644 index 0000000..b6abcb7 --- /dev/null +++ b/Module Parser KETSU/SenManga/Info/Info.html @@ -0,0 +1,114 @@ + + diff --git a/Module Parser KETSU/SenManga/MainPage/mainPage1.html b/Module Parser KETSU/SenManga/MainPage/mainPage1.html new file mode 100644 index 0000000..337c5f5 --- /dev/null +++ b/Module Parser KETSU/SenManga/MainPage/mainPage1.html @@ -0,0 +1,269 @@ + + + + \ No newline at end of file diff --git a/Module Parser KETSU/SenManga/Search/.DS_Store b/Module Parser KETSU/SenManga/Search/.DS_Store new file mode 100644 index 0000000..499fe27 Binary files /dev/null and b/Module Parser KETSU/SenManga/Search/.DS_Store differ diff --git a/Module Parser KETSU/SenManga/Search/Search.html b/Module Parser KETSU/SenManga/Search/Search.html new file mode 100644 index 0000000..7bf48cf --- /dev/null +++ b/Module Parser KETSU/SenManga/Search/Search.html @@ -0,0 +1,248 @@ + + + + + \ No newline at end of file diff --git a/Module Parser KETSU/SenManga/moduleTemplate.json b/Module Parser KETSU/SenManga/moduleTemplate.json new file mode 100644 index 0000000..1bc1e07 --- /dev/null +++ b/Module Parser KETSU/SenManga/moduleTemplate.json @@ -0,0 +1,618 @@ +{ + "moduleInfo": { + "moduleName": "SenManga", + "moduleInitials": "SM", + "moduleDesc": "Module for senmanga, a website for reading japanese raws, for those who can read or want to learn Japanese. The site is somewhat unreliable at times, but the module works for everything that the site actually has.", + "developer": "ベル", + "moduleID": "189412478518682", + "moduleImage": "https://raw.senmanga.com/favicon.ico", + "moduleVersion": 1.0, + "moduleLenguage": "JP", + "moduleType": "Image", + "baseURL": "https://raw.senmanga.com/", + "moduleDeveloperSite": "https://offsetparts.github.io/KetsuModules/", + "UpdateSite": "https://raw.githubusercontent.com/OffsetParts/KetsuModules/master/Modules/SenManga/moduleTemplate.json", + "preferedServer": "", + "preferedDownloadServer": "", + "blackListed": [ + "" + ] + }, + "global": { + "variables": [ + { + "key": "", + "value": "" + } + ], + "cookies": [ + { + "key": "", + "value": "" + } + ], + "headers": [ + { + "key": "", + "value": "" + } + ] + }, + "mainPage": [ + { + "request": { + "url": "https://raw.senmanga.com/", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "const DefaultLayouts = { ultraWideFull : 'ultraWideFull', ultraWide : 'ultraWide', wideFull : 'wideFull', wide : 'wide', wideStrechedFull : 'wideStrechedFull', wideStrechedFullDouble : 'WideStrechedFullDouble', wideStreched : 'wideStreched', wideStrechedDouble : 'wideStrechedDouble', wideStrechedFullList : 'wideStrechedFullList', wideStrechedList : 'wideStrechedList', doublets : 'doublets', doubletsDouble : 'doubletsDouble', doubletsFull : 'doubletsFull', doubletsFullDouble : 'doubletsFullDouble', doubletsConstant : 'doubletsConstant', doubletsDoubleConstant : 'doubletsDoubleConstant', doubletsFullConstant : 'doubletsFullConstant', doubletsFullDoubleConstant : 'doubletsFullDoubleConstant', longDoublets : 'longDoublets', longDoubletsDouble : 'longDoubletsDouble', longDoubletsFull : 'longDoubletsFull', longDoubletsFullDouble : 'longDoubletsFullDouble', longDoubletsConstant : 'longDoubletsConstant', longDoubletsDoubleConstant : 'longDoubletsDoubleConstant', longDoubletsFullConstant : 'longDoubletsFullConstant', longDoubletsFullDoubleConstant : 'longDoubletsFullDoubleConstant', triplets : 'triplets', tripletsDouble : 'tripletsDouble', tripletsFull : 'tripletsFull', tripletsFullDouble : 'tripletsFullDouble', tripletsConstant : 'tripletsConstant', tripletsDoubleConstant : 'tripletsDoubleConstant', tripletsFullConstant : 'tripletsFullConstant', tripletsFullDoubleConstant : 'tripletsFullDoubleConstant', longTriplets : 'longTriplets', longTripletsDouble : 'longTripletsDouble', longTripletsFull : 'longTripletsFull', longTripletsFullDouble : 'longTripletsFullDouble', longTripletsConstant : 'longTripletsConstant', longTripletsDoubleConstant : 'longTripletsDoubleConstant', longTripletsFullConstant : 'longTripletsFullConstant', longTripletsFullDoubleConstant : 'longTripletsFullDoubleConstant', none: '' }; const CellDesings = { Special1 : 'Special1', Special2 : 'Special2', Special3 : 'Special3', CELLHelperText : 'CELLHelperText', small1 : 'small1', small2 : 'small2', normal1 : 'normal1', normal2 : 'normal2', normal3 : 'normal3', normal4 : 'normal4', normal5 : 'normal5', normal6 : 'normal6', normal7 : 'normal7', wide1 : 'wide1', wide2 : 'wide2', wide3 : 'wide3', wide4 : 'wide4', wide5 : 'wide5', wide6 : 'wide6', wide7 : 'wide7', wide8 : 'wide8', wide9 : 'wide9', wide10 : 'wide10', wide11 : 'wide11' }; const Paging = { leading : 'leading', centered : 'centered', none : '' }; const Orientation = { horizontal : 'horizontal', vertical : 'vertical' }; function MainPage(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Output(cellDesing, orientation, defaultLayout, paging, section, layout, data) { this.cellDesing = cellDesing; this.orientation = orientation; this.defaultLayout = defaultLayout; this.paging = paging; this.section = section; this.layout = layout; this.data = data; } function Section(sectionName, separator) { this.sectionName = sectionName; this.separator = separator; } function Layout(insets, visibleCellsWidthS,visibleCellsWidthM,visibleCellsWidthL, visibleCellsHeight, heightForVisibleCells, cellSize, ratio, constant, horizontalSpacing, verticalSpacing) { this.insets = insets; this.visibleCellsWidthS = visibleCellsWidthS; this.visibleCellsWidthM = visibleCellsWidthM; this.visibleCellsWidthL = visibleCellsWidthL; this.visibleCellsHeight = visibleCellsHeight; this.heightForVisibleCells = heightForVisibleCells; this.cellSize = cellSize; this.ratio = ratio; this.constant = constant; this.horizontalSpacing = horizontalSpacing; this.verticalSpacing = verticalSpacing; } function Insets(top, bottom, left, right) { this.top = top; this.bottom = bottom; this.left = left; this.right = right; } function Size(width, height) { this.width = width; this.height = height; } function Ratio(inRelation, number1, number2) { this.inRelation = inRelation; this.number1 = number1; this.number2 = number2; } function Data(image, title, description, field1, field2, field3, field4, isChapter, link,openInWebView) { this.image = image; this.title = title; this.description = description; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.isChapter = isChapter; this.link = link; this.openInWebView = openInWebView; } function quickData(link,image,title,field1)  { return new Data(image,title,'unknown',field1,'unknown','unknown','unknown',false,link); } function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = a[i]; a[i] = a[j]; a[j] = x; } return a; } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let output = []; let emptyKeyValue = [new KeyValue('','')]; let updates = document.querySelector('.updates').querySelectorAll('.mng'); let dataArray = []; for(manga of updates){ let title = manga.querySelector('.dtl .text-truncate').title; var image = manga.querySelector('.cover .img-responsive').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); var link = manga.querySelector('.dtl .text-truncate').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); var chapter; if(manga.querySelector('.dtl li a') != null){ chapter = manga.querySelector('.dtl li a').innerText; } else { chapter = ''; } let data = new Data(image, title, '', chapter, '', '','',false,link); dataArray.push(data); } let topManga = document.querySelector('.series-list').querySelectorAll('li'); let topArray = []; for(manga of topManga){ let title = manga.querySelector('h2 a').text.trim(); var image = manga.querySelector('.cover .img-responsive').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); var link = manga.querySelector('h2 a').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); let data = new Data(image, title, '', '', '', '','',false,link); topArray.push(data); } output.push(new Output(CellDesings.normal1, Orientation.horizontal, DefaultLayouts.longTripletsConstant, Paging.leading, new Section('Popular', true), null, shuffle(topArray.slice()))); output.push(new Output(CellDesings.normal1, Orientation.vertical, DefaultLayouts.longTripletsFullConstant, Paging.centered, new Section('Updates', true), null, dataArray)); let MainPageObject = new MainPage(new ModuleRequest('','get',emptyKeyValue,null),new Extra([new Commands('',emptyKeyValue)],emptyKeyValue),new JavascriptConfig(true,false,''),output); var finalJson = JSON.stringify(MainPageObject); savedData.innerHTML = finalJson; console.log(finalJson);" + }, + "output": [ + { + "cellDesing": "normal1", + "orientation": "vertical", + "defaultLayout": "wide", + "paging": "", + "section": { + "sectionName": "", + "separator": false + }, + "layout": { + "insets": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "visibleCellsWidthS": 2, + "visibleCellsWidthM": 2, + "visibleCellsWidthL": 2, + "visibleCellsHeight": 2, + "heightForVisibleCells": 400, + "cellSize": { + "width": 300, + "height": 300 + }, + "ratio": { + "inRelation": "width", + "number1": 1, + "number2": 2 + }, + "constant": { + "width": 1, + "height": 2 + }, + "horizontalSpacing": 0, + "verticalSpacing": 0 + }, + "data": [ + { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "openInWebView" : false, + "isChapter": false, + "link": { + "url": "", + "method": "", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + } + } + ] + } + ] + } + ], + "search": [ + { + "request": { + "url": "https://raw.senmanga.com/search?s=", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "separator": "+", + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "const DefaultLayouts = { ultraWideFull : 'ultraWideFull', ultraWide : 'ultraWide', wideFull : 'wideFull', wide : 'wide', wideStrechedFull : 'wideStrechedFull', wideStrechedFullDouble : 'WideStrechedFullDouble', wideStreched : 'wideStreched', wideStrechedDouble : 'wideStrechedDouble', wideStrechedFullList : 'wideStrechedFullList', wideStrechedList : 'wideStrechedList', doublets : 'doublets', doubletsDouble : 'doubletsDouble', doubletsFull : 'doubletsFull', doubletsFullDouble : 'doubletsFullDouble', doubletsConstant : 'doubletsConstant', doubletsDoubleConstant : 'doubletsDoubleConstant', doubletsFullConstant : 'doubletsFullConstant', doubletsFullDoubleConstant : 'doubletsFullDoubleConstant', longDoublets : 'longDoublets', longDoubletsDouble : 'longDoubletsDouble', longDoubletsFull : 'longDoubletsFull', longDoubletsFullDouble : 'longDoubletsFullDouble', longDoubletsConstant : 'longDoubletsConstant', longDoubletsDoubleConstant : 'longDoubletsDoubleConstant', longDoubletsFullConstant : 'longDoubletsFullConstant', longDoubletsFullDoubleConstant : 'longDoubletsFullDoubleConstant', triplets : 'triplets', tripletsDouble : 'tripletsDouble', tripletsFull : 'tripletsFull', tripletsFullDouble : 'tripletsFullDouble', tripletsConstant : 'tripletsConstant', tripletsDoubleConstant : 'tripletsDoubleConstant', tripletsFullConstant : 'tripletsFullConstant', tripletsFullDoubleConstant : 'tripletsFullDoubleConstant', longTriplets : 'longTriplets', longTripletsDouble : 'longTripletsDouble', longTripletsFull : 'longTripletsFull', longTripletsFullDouble : 'longTripletsFullDouble', longTripletsConstant : 'longTripletsConstant', longTripletsDoubleConstant : 'longTripletsDoubleConstant', longTripletsFullConstant : 'longTripletsFullConstant', longTripletsFullDoubleConstant : 'longTripletsFullDoubleConstant', none: '' }; const CellDesings = { Special1 : 'Special1', Special2 : 'Special2', Special3 : 'Special3', CELLHelperText : 'CELLHelperText', small1 : 'small1', small2 : 'small2', normal1 : 'normal1', normal2 : 'normal2', normal3 : 'normal3', normal4 : 'normal4', normal5 : 'normal5', normal6 : 'normal6', normal7 : 'normal7', wide1 : 'wide1', wide2 : 'wide2', wide3 : 'wide3', wide4 : 'wide4', wide5 : 'wide5', wide6 : 'wide6', wide7 : 'wide7', wide8 : 'wide8', wide9 : 'wide9', wide10 : 'wide10', wide11 : 'wide11' }; const Paging = { leading : 'leading', centered : 'centered', none : '' }; const Orientation = { horizontal : 'horizontal', vertical : 'vertical' }; function Search(request,extra,separator,javascriptConfig,output) { this.request = request; this.extra = extra; this.separator = separator; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url,method,headers,httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands,extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName,params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript,loadInWebView,javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key,value) { this.key = key; this.value = value; } function Output(cellDesing,orientation,defaultLayout,paging,section,layout,data) { this.cellDesing = cellDesing; this.orientation = orientation; this.defaultLayout = defaultLayout; this.paging = paging; this.section = section; this.layout = layout; this.data = data; } function Section(sectionName,separator) { this.sectionName = sectionName; this.separator = separator; } function Layout(insets, visibleCellsWidthS,visibleCellsWidthM,visibleCellsWidthL, visibleCellsHeight, heightForVisibleCells, cellSize, ratio, constant, horizontalSpacing, verticalSpacing) { this.insets = insets; this.visibleCellsWidthS = visibleCellsWidthS; this.visibleCellsWidthM = visibleCellsWidthM; this.visibleCellsWidthL = visibleCellsWidthL; this.visibleCellsHeight = visibleCellsHeight; this.heightForVisibleCells = heightForVisibleCells; this.cellSize = cellSize; this.ratio = ratio; this.constant = constant; this.horizontalSpacing = horizontalSpacing; this.verticalSpacing = verticalSpacing; } function Insets(top,bottom,left,right) { this.top = top; this.bottom = bottom; this.left = left; this.right = right; } function Size(width,height) { this.width = width; this.height = height; } function Ratio(inRelation,number1,number2) { this.inRelation = inRelation; this.number1 = number1; this.number2 = number2; } function Data(image,title,description,field1,field2,field3,field4,isChapter,link,openInWebView) { this.image = image; this.title = title; this.description = description; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.isChapter = isChapter; this.link = link; this.openInWebView = openInWebView; } function quickData(link,image,title,field1)  { return new Data(image,title,'unknown',field1,'unknown','unknown','unknown',false,link); } function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = a[i]; a[i] = a[j]; a[j] = x; } return a; } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let output = []; let emptyKeyValue = [new KeyValue('','')]; let found = document.querySelector('.search-body').querySelectorAll('.mng'); let dataArray = []; for(manga of found){ var image = manga.querySelector('.cover img').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); let title = manga.querySelector('.item-info .series-title a').text.trim(); let type = manga.querySelector('.cover .type').innerText; var link = manga.querySelector('a').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); let data = new Data(image, title, '', type, '', '', '', false, link); dataArray.push(data); } output.push(new Output(CellDesings.wide6, Orientation.vertical, DefaultLayouts.doubletsFull, Paging.none, new Section('', true), null, dataArray)); let searchPageObject = new Search(new ModuleRequest('','',emptyKeyValue,null),new Extra([new Commands('',emptyKeyValue)],emptyKeyValue),'',new JavascriptConfig(true,false,''),output); var finalJson = JSON.stringify(searchPageObject); savedData.innerHTML = finalJson;" + }, + "output": [ + { + "cellDesing": "normal1", + "orientation": "vertical", + "defaultLayout": "wide", + "paging": "", + "section": { + "sectionName": "", + "separator": false + }, + "layout": { + "insets": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "visibleCellsWidthS": 2, + "visibleCellsWidthM": 2, + "visibleCellsWidthL": 2, + "visibleCellsHeight": 2, + "heightForVisibleCells": 400, + "cellSize": { + "width": 300, + "height": 300 + }, + "ratio": { + "inRelation": "width", + "number1": 1, + "number2": 2 + }, + "constant": { + "width": 1, + "height": 2 + }, + "horizontalSpacing": 0, + "verticalSpacing": 0 + }, + "data": [ + { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "openInWebView" : false, + "isChapter": false, + "link": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + ] + } + ], + "info": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "function Info(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Chapter(chapName, link,openInWebView) { this.chapName = chapName; this.link = link; this.openInWebView = openInWebView; } function Output(image, title, link, description, genres, field1, field2, field3, field4, chapters) { this.image = image; this.link = link; this.title = title; this.description = description; this.genres = genres; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.chapters = chapters; } function getStuff(array,match) { for (var x = 0 ; x< array.length;x++) { let data = array[x].innerText; if (data.includes(match)) { return data.replace(match,'').trim(); } } } function getHtmlStuff(array,match) { for (var x = 0 ; x< array.length;x++) { let data = array[x].innerText; if (data.includes(match)) { return array[x]; } } } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let emptyKeyValue = [new KeyValue('', '')]; var episodes = []; if(document.querySelector('.chapter-list') != null) { let episodesArray = document.querySelector('.chapter-list').querySelectorAll('li'); for(ep of episodesArray){ let name = ep.querySelector('.series').innerText; var link = ep.querySelector('.series').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); episodes.push(new Chapter(name, link, false)); } episodes.reverse(); } var type = document.querySelector('.info').querySelectorAll('.item')[3].innerText.split(' ')[1]; var status = document.querySelector('.info').querySelectorAll('.item')[1].innerText.split(' ')[1]; var genres = []; if(document.querySelector('.item.genre') != null){ let genreArray = document.querySelector('.item.genre').querySelectorAll('a'); for(genre of genreArray){ genres.push(genre.text); } } var desc = document.querySelector('.summary').innerText; var title = document.querySelector('.series').innerText; var image = document.querySelector('.cover img').src; image = new ModuleRequest(image,'get',emptyKeyValue,null); let infoPageObject = new Info(new ModuleRequest('', '', emptyKeyValue, null), new Extra([new Commands('', emptyKeyValue)], emptyKeyValue), new JavascriptConfig(false, false, ''), new Output(image, title, parsedJson.request, desc, genres, status, '', type, 'Chapters: ' + episodes.length, episodes)); var finalJson = JSON.stringify(infoPageObject); savedData.innerHTML = finalJson;" + }, + "output": { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "link": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "genres": [ + "" + ], + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "chapters": [ + { + "chapName": "", + "openInWebView": false, + "link": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + } + ], + "chapters": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "Cookie", + "value": "viewer=1" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "function Chapters(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Output( videos, images, text) { this.videos = videos; this.images = images; this.text = text; } function Videos(needsResolver, rawVideo) { this.needsResolver = needsResolver; this.rawVideo = rawVideo; } function NeedsResolver(resolverIdentifier, link) { this.resolverIdentifier = resolverIdentifier; this.link = link; } function RawVideo(video) { this.video = video; } function Video(videoQuality, videoLink) { this.videoQuality = videoQuality; this.videoLink = videoLink; } function Text(text) { this.text = text; } var output = []; var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); var emptyKeyValue = [new KeyValue('', '')]; let images = []; var imagesArray = document.querySelector('.reader').querySelectorAll('.picture'); for(image of imagesArray){ let imgSrc = image.src; images.push(new ModuleRequest(imgSrc, 'get', emptyKeyValue, null)); } let emptyExtra = new Extra([new Commands('', emptyKeyValue)], emptyKeyValue); var chaptersObject = new Chapters(new ModuleRequest('', '', emptyKeyValue, null), emptyExtra, new JavascriptConfig(false, false, ''), new Output(null, images, null)); var finalJson = JSON.stringify(chaptersObject); savedData.innerHTML = finalJson;" + }, + "output": { + "videos": { + "needsResolver": [ + { + "resolverIdentifier": "", + "link": { + "url": "", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ], + "rawVideo": [ + { + "video": [ + { + "videoQuality": "", + "videoLink": { + "url": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + ] + }, + "images": [ + { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + ], + "text": { + "text": "" + } + } + } + ], + "moduleResolvers": [ + { + "resolverInfo": { + "resolverName": "", + "nameMatches": [ + "" + ], + "developer": "", + "moduleID": "", + "resolverVersion": 1, + "baseURL": "" + }, + "resolver": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": false, + "loadInWebView": false, + "javaScript": "" + }, + "output": { + "moduleID": "", + "video": [ + { + "videoQuality": "720", + "videoLink": { + "url": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + } + ] + } + ], + "responseCodeFunctions": [ + { + "code": 0, + "msgTitle": "", + "msgBody": "", + "type": "normal", + "functions": [ + { + "request": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "" + } + } + ] + } + ], + "helperFunctions": [ + { + "functionName": "example", + "msgTitle": "", + "msgBody": "", + "type": "normal", + "functions": [ + { + "request": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "" + } + } + ] + } + ] +}