|
本帖最后由 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隔几分钟执行下
- # -*- coding: utf-8 -*-
- import scrapy
- from scrapy.mail import MailSender
- from scrapy.crawler import CrawlerProcess
- class 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="[email protected]",smtphost="smtp.gmail.com",smtpport=587,smtpuser="[email protected]",smtppass="gmailpassword")
- yield mailer.send(to=["[email protected]"],subject="Some subject",body=response.url)
- process = CrawlerProcess()
- process.crawl(Anynode1Spider)
- process.start()
复制代码 |
|