• 本帖最后由 eqblog 于 2018-1-16 07:40 编辑 *

update:建议使用screen命令来搭配使用

![](010.gif)
我是来蹭热度的
本脚本基于python3+sendmail实现
sendmail安装方法:
yum install sendmail -y
service sendmail start
chkconfig sendmail on
使用方法:
python 文件名 pid 邮箱
监控 香港1G:
python filename.py 93 your@email

  • from sys import argv
  • from urllib import request
  • from os import system
  • try:
  • flag=0
  • while True:
  • url='https://einstein.enoctus.co.uk/cart.php?a=add&pid='+argv[1]
  • header={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'}
  • req=request.Request(url,headers=header)
  • page=request.urlopen(req).read()
  • with open('content.txt','w') as f:
  • f.write('有货了,链接是:'+url)
  • if str(page).find('out of stock')>0:
  • flag=0
  • print('无货')
  • else:
  • flag=flag+1
  • print('有货')
  • if flag复制代码

*

![](zip.gif)

58118
(662 Bytes, 下载次数: 359)

2018-1-16 07:37 上传
点击文件名下载附件

*

脚本直链下载:https://eqblog.com/script/i.py

本代码来自一个苦逼的博主:https://eqblog.com/whmcs-python-hon.html

代码很糙不要打我
![](003.gif)