Skip to content

Instantly share code, notes, and snippets.

@174n
Last active January 14, 2018 10:34
Show Gist options
  • Save 174n/2fe5fac6ee194db24001d36fea78642c to your computer and use it in GitHub Desktop.
Save 174n/2fe5fac6ee194db24001d36fea78642c to your computer and use it in GitHub Desktop.
audioknigi.club
"https://audioknigi.club/rest/bid/"+/audioPlayer\((.*?),/g
.exec(document.querySelector("#content > div > article > div.main-frame > script:nth-child(3)").innerHTML)[1]
{
'data': [...document.querySelectorAll("article.topic")].map((e)=>{
let q = /<img(.*?)src="(.*?)"(.*?)href='(.*?)'(.*?)<a(.*?)>(.*?)<(.*?)\/">(.*?)<(.*?)text">(.*?)<div(.*?)author(.*?)>(.*?)<(.*?)performer(.*?)>(.*?)</g.exec(e.innerHTML.replace(/(?:\r\n|\r|\n)/g,''));
return {
'title': q[7],
'author': q[14],
'performer': q[17],
'description': q[11],
'category': q[9],
'image': q[2],
'link': q[4]
};
}),
'pagination':{
'prev':document.querySelector(".js-paging-prev-page").href||"",
'next':document.querySelector(".js-paging-next-page").href||""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment