前段时间为了白嫖甲骨文的免费服务器,专门办了一张建设银行的双币信用卡,结果白嫖失败,只能薅薅信用卡的羊毛了。
建设银行信用卡一元购活动仅允许新用户参与,仅需1元就能购买划算的优惠券,优惠力度挺大的。有建设银行信用卡的可以上车。
全球支付Visa卡一元购活动
2023年7月1日至12月31日,龙卡全球支付Visa信用卡(含数字版)持卡人可享一元抢购精选产品,包含20元京东E卡、视频会员月卡、茶饮代金券等,微信公众号“龙卡信用卡”回复“一元购”进入活动页面并抢购,每日限量2000个,用完即止。每位持卡人每月限购一次,活动期内限购三次。
每日限量供应,现在知道为什么需要程序监听了吧,而且还是不定时上架。
python程序监听,将里面的微信推送代码换成你自己的推送即可。
复制
import aiohttp,asyncio,json,time,os,datetime
class Jsxyk1Yg:
def __init__(self):
self.goods_list_url = "https://vtravel.link2shops.com/vfuliApi/api/client/ypJyActivity/goodsList"
self.headers = {
'Content-Type':'application/json;charset=UTF-8',
'Host':'vtravel.link2shops.com',
'Connection':'Keep-Alive',
'Accept-Encoding':'gzip, deflate, br',
'User-Agent':' Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36'
}
self.session = aiohttp.ClientSession()
self.wechat_url='你的推送url'
#异步获取商品详情
async def get_goods_detail(self,id):
#准备post数据包发送json数据
data ={"activityTag":"ccbyyg","catagoryId":""}
#发送请求
async with self.session.post(self.goods_list_url,data=json.dumps(data),headers=self.headers) as response:
#获取响应数据
response = await response.json()
if response['code'] == 0 and response['msg']=='success':
goodsList=response['data']['goodsList']
for item in goodsList:
if item.get("id") == id:
if self.check_update_date() and item['stock']!=0:
res=await self.send_wechat(item['name'],item['soldOutPrompt']+str(item['stock']))
print(res)
else:
print(response)
#返回响应数据
return response
#判断是否需要发送通知
def check_update_date(self):
file_path = "daimadog.com"
current_date = datetime.date.today()
if os.path.exists(file_path):
# 获取文件的最后更新日期
last_update_date = datetime.date.fromtimestamp(os.path.getmtime(file_path))
if last_update_date != current_date:
# 更新最后日期
with open(file_path, "a"):
os.utime(file_path, None)
return True
else:
return False
else:
# 创建文件
with open(file_path, "w"):
pass
return True
#企业微信异步推送
async def send_wechat(self,title,content):
#这里换成你的推送代码,仅仅只是示例
async with self.session.post(url=self.wechat_url,data=json.dumps(data),headers=self.headers) as response:
#获取响应数据
response = await response.text()
#返回响应数据
return response
if __name__ == '__main__':
async def get_data():
#获取商品详情
goods_detail = Jsxyk1Yg()
#监听微信支付立减券
response = await goods_detail.get_goods_detail("88ddb1382e5d435a977150fdb8aa0001")
await goods_detail.session.close()
return response
#result =asyncio.run(get_data())
result=asyncio.get_event_loop().run_until_complete(get_data())将上面的代码,放到服务器上,使用定时任务,每隔1分钟执行一次。狗哥亲测效果还行,手动一周都没抢到,昨天挂上代码,今天就抢到了。
添加crontab定时任务
使用ssh链接服务器,输入命令进入定时任务编辑。
复制
crontab -e
在Vim编辑器中,按i键进入编辑模式,在文件底部新增一行,内容如下。
复制
*/1 8-12 * * * python3 /你的python程序路径
最后按下ESC键退出编辑模式,输入:wq保存并退出
注意:本程序仅提供监控功能,不包含自动下单购买的代码。






评论 (0)