|
本帖最后由 superxxx 于 2018-12-6 18:36 编辑
又有了4台,谁赶紧买走

哈哈
https://billing.anynode.net/aff.php?aff=742&gid=26
无aff
https://billing.anynode.net/cart.php?gid=26
送上监控脚本
用crontab隔几分钟执行下

[ol]# -*- coding: utf-8 -*-import scrapyfrom scrapy.mail import MailSenderfrom scrapy.crawler import CrawlerProcessclass Anynode1Spider(scrapy.Spider): name = 'anynode1' start_urls = ['https://billing.anynode.net/cart.php?a=add&pid=165'] def parse(self, response): if response.xpath('//h1/text()').extract_first(): pass else: mailer = MailSender(mailfrom="yours@gmail.com",smtphost="smtp.gmail.com",smtpport=587,smtpuser="yours@gmail.com",smtppass="gmailpassword") yield mailer.send(to=["yours@gmail.com"],subject="Some subject",body=response.url)process = CrawlerProcess()process.crawl(Anynode1Spider)process.start()[/ol]复制代码 |
|