var frees = document.getElementsByClassName('zhuanlan-subscribe-btn');
var free = [];
for (var i = 0; i < frees.length; i++) {
var item = frees[i];
var span = item.getElementsByTagName('span')[0]
if (span.innerText == '免费订阅') {
free.push(item)
}
}
for (var i = 0; i < free.length; i++) {
var item = free[i];
var name = item.getAttribute('data-domain-name');
var url = 'https://xiaozhuanlan.com/' + name + '/subscribe'
var rq = new XMLHttpRequest();
rq.open('GET', url, true)
rq.send()
}
网友评论