Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"Coomer|Kemono|Nekohouse-x-q-p":{"link":"^((?:beta\\.)?((?:kemono|coomer|nekohouse)\\.(?:party|su))/)([^/]+/user/[^/]+/post/\\w+).*","url":": $[2]!=='n' ? `//${$[1]}api/v1/${$[3]}` : $[0]","res":":\nconst low_resolution_first = false\n\nif($[2][0]==='n'){\nconst t=$._.match(/\"post__content\">\\n<pre>(.+?)<\\/pre>/s)?.[1]||''\nreturn [...$._.matchAll(/(?:class=\"fileThumb\"[^\\w]+href|src(?==\"[^>]+type=\"video\\/[^\"]{3,4}\"))=\"([^\"]+)\"(?:[^>]+>[^>]+src=\"([^\"]+))?/g)].map((i,n)=>[[(!low_resolution_first?'#':'')+i[1]?.replace(/^\\/[^\\/]/,'//'+$[1]+'$&'),(!low_resolution_first?'':'#')+i[2]?.replace(/^\\/[^\\/]/,'//'+$[1]+'$&')],!n?t:''])\n}\nlet res=[];\nconst img = m => {\nconst l=low_resolution_first, i=Math.ceil(Math.random()*4), u='//n'+i+'.'+$[2]+'/data'+m;\nreturn /\\.mp4/.test(m) ? u : [(l?'':'#')+u,(l?'#':'')+'//img.'+$[2]+'/thumbnail/data'+m];\n}\n$._=JSON.parse($._).post;\nif($._.file.path)res.push([img($._.file.path)]);\n$._.attachments?.forEach(i=>res.push([img(i.path)]));\nif(res[0])res[0][1]=[new Date($._.added).toLocaleString(),$._.content||'',$._.tags&&'Tags:['+$._.tags?.join(', ')+']'].filter(Boolean).join(' | ');\nreturn res","img":"^(img\\.)?((?:coomer|kemono|nekohouse)\\.(?:party|su))/thumbnail","to":":\nreturn $[1] ? '//n'+Math.ceil(Math.random()*4)+'.'+$[2] : $[2]"}}
Advertisement
Add Comment
Please, Sign In to add comment