ผลต่างระหว่างรุ่นของ "ผู้ใช้:Ans/script"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
Ans (คุย | ส่วนร่วม)
wget
Ans (คุย | ส่วนร่วม)
js for เมนูทีวี
บรรทัด 19:
"mode": "cors"
})).json(); console.log(a.minTs, b.push(...a.items.content)) } console.log('break', a.minTs); return b; })(1500760860)</source>
** <source lang=js>'\n'+(await (async function(a) { a={minTs:a}; let b=[]; for(let i=0; i<500 && 'minTs' in a && a.minTs>0; ++i) { a=await (await fetch("https://www.thairath.co.th/api-tags?tags=%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B8%B9%E0%B8%97%E0%B8%B5%E0%B8%A7%E0%B8%B5&before="+a.minTs, {
"credentials": "include",
"referrer": "https://www.thairath.co.th/tags/%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B8%B9%E0%B8%97%E0%B8%B5%E0%B8%A7%E0%B8%B5",
"method": "GET",
"mode": "cors"
})).json(); console.log(i, a.minTs, a.items.content.length, b.push(...a.items.content)) } console.log('break', a.minTs); return b; })(1500760860)).map(a=>'*# [https://www.thairath.co.th'+a.fullPath+' '+a.title+']').reverse().join('\n')+'\n'</source>
* $ <source lang=bash>set -- https://www.thairath.co.th/content/392{859..000} ; while (( $# > 0 )) ; do wget -qO- "$1" | grep -m1 -i -o '<title>.*เมนู[^<]*<.......' && echo "$1" ; shift ; done</source>
** $ <source lang=bash>set -- https://www.thairath.co.th/content/392{859..000} ; while (( $# > 0 )) ; do { wget -t1 -qO- "$1" || echo '<title>errorเมนู</title>' ; } | grep -m1 -i -o '<title>.*เมนู[^<]*<.......' && echo "$1" ; shift ; done</source>