javascript: var d = document; dv = d.getElementsByClassName('UaW15H'); var cnt = dv.length; var cnttg = document.createElement('div'); cnttg.textContent = cnt; d.getElementsByClassName('_1-AKXD')[0].appendChild(cnttg); for (i = 0; i < dv.length; i++) { aa = dv[i].getElementsByTagName('img')[0]; nm = aa.getAttribute('alt'); ln = 'https://www.amazon.co.jp/s/ref=nb_sb_noss?__mk_ja_JP=カタカナ&url=node%3D4217521051&field-keywords=' + encodeURIComponent(nm); var req = new XMLHttpRequest(); rm = dv[i].getElementsByClassName('_2tj2Cj')[0]; req.rm = dv[i]; req.ln = ln; req.nnm = nm; req.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { rf = this.responseXML.getElementsByClassName('sg-row-align-items-center'); hit = false; if (rf != null && rf[0].textContent.indexOf('30日以内に') > 0) { ls = this.responseXML.getElementsByClassName('rush-component s-latency-cf-section'); if (ls.length > 0) { hit = true; chs = ls[0].children; en = '終了確認?'; for (chi = 0; chi < chs.length; chi++) { ch = chs[chi]; h5 = ch.getElementsByClassName('s-line-clamp-2'); if (h5.length > 0) { tnm = h5[0].textContent.trim(); if (tnm == this.nnm) { en = '終了確認'; } } } a = d.createElement('a'); a.href = this.ln; a.textContent = en; a.setAttribute('target', '_blank'); dd = d.createElement('div'); a.setAttribute('style', 'float:right'); dd.appendChild(a); this.rm.appendChild(dd); hit = true; } } if (hit == false) { this.rm.style.display = 'none'; } cnt--; cnttg.textContent = cnt; } } ; req.open('GET', ln, true); req.responseType = "document"; req.send(null); } ;
?なし
javascript: var d = document; dv = d.getElementsByClassName('UaW15H'); var cnt = dv.length; var cnttg = document.createElement('div'); cnttg.textContent = cnt; d.getElementsByClassName('_1-AKXD')[0].appendChild(cnttg); for (i = 0; i < dv.length; i++) { aa = dv[i].getElementsByTagName('img')[0]; nm = aa.getAttribute('alt'); ln = 'https://www.amazon.co.jp/s/ref=nb_sb_noss?__mk_ja_JP=カタカナ&url=node%3D4217521051&field-keywords=' + encodeURIComponent(nm); var req = new XMLHttpRequest(); rm = dv[i].getElementsByClassName('_2tj2Cj')[0]; req.rm = dv[i]; req.ln = ln; req.nnm = nm; req.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { rf = this.responseXML.getElementsByClassName('sg-row-align-items-center'); hit = false; if (rf != null && rf[0].textContent.indexOf('30日以内に') > 0) { ls = this.responseXML.getElementsByClassName('rush-component s-latency-cf-section'); if (ls.length > 0) { hit = true; chs = ls[0].children; en = ''; for (chi = 0; chi < chs.length; chi++) { ch = chs[chi]; h5 = ch.getElementsByClassName('s-line-clamp-2'); if (h5.length > 0) { tnm = h5[0].textContent.trim(); if (tnm == this.nnm) { en = '終了確認'; } } } if (en != '') { a = d.createElement('a'); a.href = this.ln; a.textContent = en; a.setAttribute('target', '_blank'); dd = d.createElement('div'); a.setAttribute('style', 'float:right'); dd.appendChild(a); this.rm.appendChild(dd); hit = true; } else { this.rm.style.display = 'none'; } } } if (hit == false) { this.rm.style.display = 'none'; } cnt--; cnttg.textContent = cnt; } }; req.open('GET', ln, true); req.responseType = "document"; req.send(null); };