Add files via upload

This commit is contained in:
blusunny
2023-10-26 20:20:47 +08:00
committed by GitHub
parent 2d94147694
commit 6b672fcf6f
20 changed files with 3204 additions and 1628 deletions

15
bwcj.js Normal file

File diff suppressed because one or more lines are too long

15
chinaTelecom.js Normal file

File diff suppressed because one or more lines are too long

20
chinaUnicom.js Normal file

File diff suppressed because one or more lines are too long

228
dygy.js

File diff suppressed because one or more lines are too long

27
elmV3.js Normal file

File diff suppressed because one or more lines are too long

37
enshan.py Normal file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# -------------------------------
# @Author : github@wd210010 https://github.com/wd210010/only_for_happly
# @Time : 2023/10/4 16:23
# -------------------------------
# cron "0 0 2 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('恩山签到')
import requests,re,os
#配置恩山的cookie 到配置文件config.sh export enshanck='' 需要推送配置推送加token export plustoken=''
enshanck = os.getenv("enshanck")
#推送加 token
plustoken = os.getenv("plustoken")
def Push(contents):
# 推送加
headers = {'Content-Type': 'application/json'}
json = {"token": plustoken, 'title': '恩山签到', 'content': contents.replace('\n', '<br>'), "template": "json"}
resp = requests.post(f'http://www.pushplus.plus/send', json=json, headers=headers).json()
print('push+推送成功' if resp['code'] == 200 else 'push+推送失败')
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36",
"Cookie": enshanck,
}
session = requests.session()
response = session.get('https://www.right.com.cn/FORUM/home.php?mod=spacecp&ac=credit&showcredit=1', headers=headers)
try:
coin = re.findall("恩山币: </em>(.*?)nb &nbsp;", response.text)[0]
point = re.findall("<em>积分: </em>(.*?)<span", response.text)[0]
res = f"恩山币:{coin}\n积分:{point}"
print(res)
Push(contents=res)
except Exception as e:
res = str(e)

340
hdl.js Normal file

File diff suppressed because one or more lines are too long

159
imaotai.py Normal file
View File

@@ -0,0 +1,159 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# @Time : 2023/05/03 10:23
# -------------------------------
# cron "1,30 9 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('小茅预约');
import datetime #line:1
import os #line:2
import random #line:3
import time #line:4
import re #line:5
import requests #line:6
import base64 #line:7
import json #line:8
#原创 微信公众号@爱上羊毛侠
# 青龙面板加入环境变量MTTokenD
# MTTokenD是茅台预约参数多个请换行格式'省份,城市,经度,维度,设备id,token,MT-Token-Wap(抓包小茅运)'
p_c_map ={}#line:1
mt_r ='clips_OlU6TmFRag5rCXwbNAQ/Tz1SKlN8THcecBp/'#line:2
res_map ={'10213':'贵州茅台酒(癸卯兔年)','2476':'贵州茅台酒(壬寅虎年)','10214':'贵州茅台酒癸卯兔年x2'}#line:7
def mt_add (OOOOO0O00O00O0000 ,OOO00OOO0O00OO00O ,OOOO00000O00OO0O0 ,O00000O0OO00OO00O ,OO0OO0000O000O0O0 ,O0OO000O00O0OO00O ):#line:10
O00OO000OOOOO0OO0 =f'{int(time.time() * 1000)}'#line:11
OOOO0OOO0OO0O000O =requests .get (f'http://82.157.10.108:8086/get_mtv?DeviceID={O0OO000O00O0OO00O}&MTk={O00OO000OOOOO0OO0}&version={mt_version}&key=yaohuo')#line:13
OO000O00O0000OO00 ={'User-Agent':'iPhone 14','MT-Token':OO0OO0000O000O0O0 ,'MT-Network-Type':'WIFI','MT-User-Tag':'0','MT-R':mt_r ,'MT-Lat':'','MT-K':O00OO000OOOOO0OO0 ,'MT-Lng':'','MT-Info':'028e7f96f6369cafe1d105579c5b9377','MT-APP-Version':mt_version ,'MT-Request-ID':f'{int(time.time() * 1000)}','Accept-Language':'zh-Hans-CN;q=1','MT-Device-ID':O0OO000O00O0OO00O ,'MT-V':OOOO0OOO0OO0O000O .text ,'MT-Bundle-ID':'com.moutai.mall','mt-lng':lng ,'mt-lat':lat }#line:23
OOOO0O0O0000000O0 ={"itemInfoList":[{"count":1 ,"itemId":str (OOOOO0O00O00O0000 )}],"sessionId":OOOO00000O00OO0O0 ,"userId":str (O00000O0OO00OO00O ),"shopId":str (OOO00OOO0O00OO00O )}#line:25
OOOO0OOO0OO0O000O =requests .get ('http://82.157.10.108:8086/get_actParam?key=yaohuo&actParam='+base64 .b64encode (json .dumps (OOOO0O0O0000000O0 ).replace (' ','').encode ('utf8')).decode ())#line:27
OOOO0O0O0000000O0 ['actParam']=OOOO0OOO0OO0O000O .text #line:28
O00OO0OOO00OOO0OO =OOOO0O0O0000000O0 #line:29
OOO0OO0OO00O00OO0 =requests .post ('https://app.moutai519.com.cn/xhr/front/mall/reservation/add',headers =OO000O00O0000OO00 ,json =O00OO0OOO00OOO0OO )#line:31
O0OOOO0OOO0OO0OOO =OOO0OO0OO00O00OO0 .json ().get ('code',0 )#line:32
if O0OOOO0OOO0OO0OOO ==2000 :#line:33
return OOO0OO0OO00O00OO0 .json ().get ('data',{}).get ('successDesc',"未知")#line:34
return '申购失败:'+OOO0OO0OO00O00OO0 .json ().get ('message',"未知原因")#line:35
def tongzhi (OOO0O0O0O0OOOO0OO ):#line:38
OOOOOOO0O0O000OO0 =os .getenv ('mtec_user','').split (',')#line:39
for OO0O0000OOO0O0000 in OOOOOOO0O0O000OO0 :#line:40
O0OOOOO0O000000OO ='http://wxpusher.zjiecode.com/api/send/message/?appToken=&content={}&uid={}'.format (OOO0O0O0O0OOOO0OO ,OO0O0000OOO0O0000 )#line:42
O000O0O0O0OOO0O00 =requests .get (O0OOOOO0O000000OO )#line:43
print (O000O0O0O0OOO0O00 .text )#line:44
def get_session_id (O0O0O00OO00OO0OOO ,O000O0OOO0OOOO0O0 ):#line:47
OO0OOOOOOO00O0000 ={'mt-device-id':O0O0O00OO00OO0OOO ,'mt-user-tag':'0','accept':'*/*','mt-network-type':'WIFI','mt-token':O000O0OOO0OOOO0O0 ,'mt-bundle-id':'com.moutai.mall','accept-language':'zh-Hans-CN;q=1','mt-request-id':f'{int(time.time() * 1000)}','mt-app-version':mt_version ,'user-agent':'iPhone 14','mt-r':mt_r ,'mt-lng':lng ,'mt-lat':lat }#line:62
O00OO00O0OOO000OO =requests .get ('https://static.moutai519.com.cn/mt-backend/xhr/front/mall/index/session/get/'+time_keys ,headers =OO0OOOOOOO00O0000 )#line:65
OOOO00O00OO00OOOO =O00OO00O0OOO000OO .json ().get ('data',{}).get ('sessionId')#line:66
O00OOO0OOOOOOO0OO =O00OO00O0OOO000OO .json ().get ('data',{}).get ('itemList',[])#line:67
O0O000O0O0O0O00OO =[OO0OOOO0OOO0000OO .get ('itemCode')for OO0OOOO0OOO0000OO in O00OOO0OOOOOOO0OO ]#line:68
return OOOO00O00OO00OOOO ,O0O000O0O0O0O00OO #line:69
def get_shop_item (OO000O0OOOOOO00OO ,OOO0O0O0O00OO0OOO ,O00000O000000000O ,O0OOO0O0O0O0O00OO ,OOO0O000OO0000000 ,OO0OOOO000OO00OOO ):#line:72
O000OO0000OOO00O0 ={'mt-device-id':O00000O000000000O ,'mt-user-tag':'0','mt-lat':'','accept':'*/*','mt-network-type':'WIFI','mt-token':O0OOO0O0O0O0O00OO ,'mt-bundle-id':'com.moutai.mall','accept-language':'zh-Hans-CN;q=1','mt-request-id':f'{int(time.time() * 1000)}','mt-r':mt_r ,'mt-app-version':mt_version ,'user-agent':'iPhone 14','mt-lng':lng ,'mt-lat':lat }#line:88
OO00OOOO00OOOO0OO =requests .get ('https://static.moutai519.com.cn/mt-backend/xhr/front/mall/shop/list/slim/v3/'+str (OO000O0OOOOOO00OO )+'/'+OOO0O000OO0000000 +'/'+str (OOO0O0O0O00OO0OOO )+'/'+time_keys ,headers =O000OO0000OOO00O0 )#line:93
O00OO0OO00O0OOO00 =OO00OOOO00OOOO0OO .json ().get ('data',{})#line:94
OO0O0OO00OOOO000O =O00OO0OO00O0OOO00 .get ('shops',[])#line:95
OO000OOO00OO0OO00 =p_c_map [OOO0O000OO0000000 ][OO0OOOO000OO00OOO ]#line:96
for O0O0O0O00OO0O0OO0 in OO0O0OO00OOOO000O :#line:97
if not O0O0O0O00OO0O0OO0 .get ('shopId')in OO000OOO00OO0OO00 :#line:98
continue #line:99
if OOO0O0O0O00OO0OOO in str (O0O0O0O00OO0O0OO0 ):#line:100
return O0O0O0O00OO0O0OO0 .get ('shopId')#line:101
def get_user_id (O0O00O0O0OOOO0OO0 ,O0OOOO0OO0000O000 ):#line:104
OOOO0OO0O0OOOOOO0 ={'MT-User-Tag':'0','Accept':'*/*','MT-Network-Type':'WIFI','MT-Token':O0O00O0O0OOOO0OO0 ,'MT-Bundle-ID':'com.moutai.mall','Accept-Language':'zh-Hans-CN;q=1, en-CN;q=0.9','MT-Request-ID':f'{int(time.time() * 1000)}','MT-APP-Version':mt_version ,'User-Agent':'iOS;16.0.1;Apple;iPhone 14 ProMax','MT-R':mt_r ,'MT-Device-ID':O0OOOO0OO0000O000 ,'mt-lng':lng ,'mt-lat':lat }#line:119
OOOOO0O0OOO00000O =requests .get ('https://app.moutai519.com.cn/xhr/front/user/info',headers =OOOO0OO0O0OOOOOO0 )#line:122
O00O000000OOO000O =OOOOO0O0OOO00000O .json ().get ('data',{}).get ('userName')#line:123
O00OOO0O0OOO00O0O =OOOOO0O0OOO00000O .json ().get ('data',{}).get ('userId')#line:124
OO0O00OOO0OOOOOO0 =OOOOO0O0OOO00000O .json ().get ('data',{}).get ('mobile')#line:125
return O00O000000OOO000O ,O00OOO0O0OOO00O0O ,OO0O00OOO0OOOOOO0 #line:126
def getUserEnergyAward (O0OO0000O0000OOO0 ,OOO000O0OO0OO0000 ):#line:129
"""
领取耐力
:return:
"""#line:133
OO00OOOO0O0O0O000 ={'MT-Device-ID-Wap':O0OO0000O0000OOO0 ,'MT-Token-Wap':OOO000O0OO0OO0000 ,'YX_SUPPORT_WEBP':'1',}#line:139
O0OOO0OOO0O000OO0 ={'X-Requested-With':'XMLHttpRequest','User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 15_2_1 like Mac OS X)','Referer':'https://h5.moutai519.com.cn/gux/game/main?appConfig=2_1_2','Client-User-Agent':'iOS;15.0.1;Apple;iPhone 12 ProMax','MT-R':mt_r ,'Origin':'https://h5.moutai519.com.cn','MT-APP-Version':mt_version ,'MT-Request-ID':f'{int(time.time() * 1000)}','Accept-Language':'zh-CN,zh-Hans;q=0.9','MT-Device-ID':O0OO0000O0000OOO0 ,'Accept':'application/json, text/javascript, */*; q=0.01','mt-lng':lng ,'mt-lat':lat }#line:155
OO00OOO0000O0O000 =requests .post ('https://h5.moutai519.com.cn/game/isolationPage/getUserEnergyAward',cookies =OO00OOOO0O0O0O000 ,headers =O0OOO0OOO0O000OO0 ,json ={})#line:157
return OO00OOO0000O0O000 .json ().get ('message')if '无法领取奖励'in OO00OOO0000O0O000 .text else "领取奖励成功"#line:158
def get_map ():#line:161
global p_c_map #line:162
O0O0O00000O000OOO ='https://static.moutai519.com.cn/mt-backend/xhr/front/mall/resource/get'#line:163
O00O00000O0OO00O0 ={'X-Requested-With':'XMLHttpRequest','User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_1 like Mac OS X)','Referer':'https://h5.moutai519.com.cn/gux/game/main?appConfig=2_1_2','Client-User-Agent':'iOS;16.0.1;Apple;iPhone 14 ProMax','MT-R':mt_r ,'Origin':'https://h5.moutai519.com.cn','MT-APP-Version':mt_version ,'MT-Request-ID':f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}','Accept-Language':'zh-CN,zh-Hans;q=1','MT-Device-ID':f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}','Accept':'application/json, text/javascript, */*; q=0.01','mt-lng':lng ,'mt-lat':lat }#line:178
OOOOOOOOO000O0000 =requests .get (O0O0O00000O000OOO ,headers =O00O00000O0OO00O0 ,)#line:179
OO0OOO0O0O00000OO =OOOOOOOOO000O0000 .json ().get ('data',{}).get ('mtshops_pc',{})#line:180
O0OO00O0OOOOOOO00 =OO0OOO0O0O00000OO .get ('url')#line:181
OO0O0O0O00000OOOO =requests .get (O0OO00O0OOOOOOO00 )#line:182
for OO00000OO0O0O0O00 ,O0O0000OO0O000OO0 in dict (OO0O0O0O00000OOOO .json ()).items ():#line:183
O00O00O000OOOOO0O =O0O0000OO0O000OO0 .get ('provinceName')#line:184
O00000OO000OOOO0O =O0O0000OO0O000OO0 .get ('cityName')#line:185
if not p_c_map .get (O00O00O000OOOOO0O ):#line:186
p_c_map [O00O00O000OOOOO0O ]={}#line:187
if not p_c_map [O00O00O000OOOOO0O ].get (O00000OO000OOOO0O ,None ):#line:188
p_c_map [O00O00O000OOOOO0O ][O00000OO000OOOO0O ]=[OO00000OO0O0O0O00 ]#line:189
else :#line:190
p_c_map [O00O00O000OOOOO0O ][O00000OO000OOOO0O ].append (OO00000OO0O0O0O00 )#line:191
return p_c_map #line:192
def login (O0000OOOOOOO0O0O0 ,OOOO00O0OO0OO00OO ,O0O0O0OO0000OOOO0 ):#line:195
"""
:param phone: 手机号
:param vCode: 验证码
:param Device_ID: 设备id
:return:
"""#line:202
O0O00OO00O0OO0O0O =f'{int(time.time() * 1000)}'#line:203
OOOOOO000O00OO0O0 =requests .get (f'http://82.157.10.108:8086/get_mtv?DeviceID={O0O0O0OO0000OOOO0}&MTk={O0O00OO00O0OO0O0O}&version={mt_version}&key=yaohuo')#line:205
O0OOO00OO00O0OOO0 ={'MT-Device-ID':O0O0O0OO0000OOOO0 ,'MT-User-Tag':'0','Accept':'*/*','MT-Network-Type':'WIFI','MT-Token':'','MT-K':O0O00OO00O0OO0O0O ,'MT-Bundle-ID':'com.moutai.mall','MT-V':OOOOOO000O00OO0O0 .text ,'User-Agent':'iOS;16.0.1;Apple;iPhone 14 ProMax','Accept-Language':'zh-Hans-CN;q=1','MT-Request-ID':f'{int(time.time() * 1000)}18342','MT-R':mt_r ,'MT-APP-Version':mt_version ,}#line:220
OO000O000OO0O0OO0 ={'ydToken':'','mobile':f'{O0000OOOOOOO0O0O0}','vCode':f'{OOOO00O0OO0OO00OO}','ydLogId':'',}#line:227
OOO00O00O00000O0O =requests .post ('https://app.moutai519.com.cn/xhr/front/user/register/login',headers =O0OOO00OO00O0OOO0 ,json =OO000O000OO0O0OO0 )#line:230
OO0O00O00OO0O000O =OOO00O00O00000O0O .json ().get ('data',{})#line:231
OOO00O000O0O00O00 =OO0O00O00OO0O000O .get ('token')#line:232
O000OOO0OO0O0O000 =OO0O00O00OO0O000O .get ('cookie')#line:233
print (O0O0O0OO0000OOOO0 ,OOO00O000O0O00O00 ,O000OOO0OO0O0O000 )#line:234
return O0O0O0OO0000OOOO0 ,OOO00O000O0O00O00 ,O000OOO0OO0O0O000 #line:235
def Push(contents):
# plustoken推送
headers = {'Content-Type': 'application/json'}
json = {"token": plustoken, 'title': '茅台预约推送', 'content': contents.replace('\n', '<br>'), "template": "json"}
resp = requests.post(f'http://www.pushplus.plus/send', json=json, headers=headers).json()
print('push+推送成功' if resp['code'] == 200 else 'push+推送失败')
if __name__ =='__main__':#line:245
plustoken =os .getenv ("plustoken")#line:246
mt_tokens =os .getenv ("MTTokenD")#line:247
mt_version ="".join (re .findall ('whats-new__latest__version">(.*?)</p>',requests .get ('https://apps.apple.com/cn/app/i%E8%8C%85%E5%8F%B0/id1600482450').text ,re .S )).replace ('版本 ','').replace('版本 ','')#line:248
print ('当前最新版本为:'+mt_version )#line:249
if not mt_tokens :#line:250
print ('MTToken is null')#line:251
exit ()#line:252
mt_token_list =mt_tokens .split ('&')#line:253
s ="-------------------总共"+str (int (len (mt_token_list )))+"个用户-------------------"+'\n'#line:256
userCount =0 #line:257
if len (mt_token_list )>0 :#line:258
for mt_token in mt_token_list :#line:259
userCount +=1 #line:260
province ,city ,lng ,lat ,device_id ,token ,ck =mt_token .split (',')#line:262
time_keys =str (int (time .mktime (datetime .date .today ().timetuple ()))*1000 )#line:264
get_map ()#line:265
try :#line:267
sessionId ,itemCodes =get_session_id (device_id ,token )#line:268
userName ,user_id ,mobile =get_user_id (token ,device_id )#line:269
if not user_id :#line:270
s +=""+str (userCount )+"个用户token失效请重新登录"+'\n'#line:271
continue #line:272
s +=""+str (userCount )+"个用户----------------"+userName +'_'+mobile +"开始任务"+"----------------"+'\n'#line:274
for itemCode in itemCodes :#line:275
name =res_map .get (str (itemCode ))#line:276
if name :#line:277
shop_id =get_shop_item (sessionId ,itemCode ,device_id ,token ,province ,city )#line:279
res =mt_add (itemCode ,str (shop_id ),sessionId ,user_id ,token ,device_id )#line:281
s +=itemCode +'_'+name +'---------------'+res +'\n'#line:283
if ck :#line:284
r =getUserEnergyAward (device_id ,ck )#line:285
s +=userName +'_'+mobile +'---------------'+"小茅运:"+r +'\n'#line:287
s +=userName +'_'+mobile +"正常结束任务"+'\n \n'#line:288
except Exception as e :#line:289
s +=userName +'_'+mobile +"异常信息"+e #line:290
print (s )#line:291
Push (contents =s )#line:292

360
iqiyi_new.py Normal file
View File

@@ -0,0 +1,360 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# -------------------------------
# @Author : github@limoruirui https://github.com/limoruirui
# @Time : 5/5/2022 20:09
# -------------------------------
# cron "30 7,10 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('爱奇艺签到加刷时长')
"""
1.爱奇艺每日任务脚本 请低调使用 请不要用于商业牟利 一天一次 请自行斟酌设置crontab
2.cookie获取方式
1.cookie可以用别人loon、qx等软件的mitm类自动获取再去boxjs里复制出来填写到环境变量或本脚本中
2.也可以自行抓包 电脑或者手机都可以
3.实在都不会
3.cookie食用方式: 可以只保留P00001=xxx;中xxx的值 也可以整段都要 青龙运行可新建并放入到环境变量 iqy_ck 中 也可以直接填写在本脚本中
4.关于dfp
1.dfp相当于爱奇艺的浏览器指纹 不需要登录也会有 有效期非常长 实测半年多前的还能用 其中领取每日任务的奖励和刷观影时长都需要使用到
2.dfp目前本脚本写死了一个 但是多用户使用同一个不知道有没有风险
3.建议有能力的自己抓包 在cookie里的__dfp字段 然后环境变量新增 iqiyi_dfp 填入 或者在本脚本内写死
4.不会自己抓的话 请打开设置环境变量 get_iqiyi_dfp 为 True 再执行脚本会获得并输出到面板 请复制后按上一条填入环境变量 获取完请删除get_iqiyi_dfp环境变量 小鸡经不起操
5.get请求 没携带任何东西出去 开源脚本 请不要说什么提交什么东西到我服务器
5.库中有每月自动领取爱奇艺会员天数红包的脚本 可配合使用(需有高等级的运行脚本提供红包 其它人才可以领取)
"""
cookie = ""
iqiyi_dfp = ""
from time import sleep, time
from random import randint, choice
from json import dumps
from hashlib import md5 as md5Encode
from string import digits, ascii_lowercase, ascii_uppercase
from sys import exit, stdout
from os import environ, system
from re import findall
try:
from requests import Session, get, post
from fake_useragent import UserAgent
except:
print(
"你还没有安装requests库和fake_useragent库 正在尝试自动安装 请在安装结束后重新执行此脚本\n若还是提示本条消息 请自行运行pip3 install requests和pip3 install fake-useragent或者在青龙的依赖管理里安装python的requests和fake-useragent")
system("pip3 install fake-useragent")
system("pip3 install requests")
print("安装完成 脚本退出 请重新执行")
exit(0)
iqy_ck = environ.get("iqy_ck") if environ.get("iqy_ck") else cookie
get_iqiyi_dfp = environ.get("get_iqiyi_dfp") if environ.get("get_iqiyi_dfp") else False
pushplus_token = environ.get("PUSH_PLUS_TOKEN") if environ.get("PUSH_PLUS_TOKEN") else ""
tgbot_token = environ.get("TG_BOT_TOKEN") if environ.get("TG_BOT_TOKEN") else ""
tg_userId = environ.get("TG_USER_ID") if environ.get("TG_USER_ID") else ""
tg_push_api = environ.get("TG_API_HOST") if environ.get("TG_API_HOST") else ""
if iqy_ck == "":
print("未填写cookie 青龙可在环境变量设置 iqy_ck 或者在本脚本文件上方将获取到的cookie填入cookie中")
exit(0)
if "__dfp" in iqy_ck:
iqiyi_dfp = findall(r"__dfp=(.*?)(;|$)", iqy_ck)[0][0]
iqiyi_dfp = iqiyi_dfp.split("@")[0]
if "P00001" in iqy_ck:
iqy_ck = findall(r"P00001=(.*?)(;|$)", iqy_ck)[0][0]
if iqiyi_dfp == "":
iqiyi_dfp = environ.get("iqiyi_dfp") if environ.get(
"iqiyi_dfp") else "a18af56a9b6a224272ab8ed00d1a587078cd5c8ab119b2a4a689d5a22f06bcbd8b"
class Iqiyi:
def __init__(self, ck, dfp):
self.ck = ck
self.session = Session()
self.user_agent = UserAgent().chrome
self.headers = {
"User-Agent": self.user_agent,
"Cookie": f"P00001={self.ck}",
"Content-Type": "application/json"
}
self.dfp = dfp
self.uid = ""
self.msg = ""
self.user_info = ""
self.sleep_await = environ.get("sleep_await") if environ.get("sleep_await") else 1
"""工具"""
def req(self, url, req_method="GET", body=None):
data = {}
if req_method.upper() == "GET":
try:
data = self.session.get(url, headers=self.headers, params=body).json()
except:
self.print_now("请求发送失败,可能为网络异常")
# data = self.session.get(url, headers=self.headers, params=body).text
return data
elif req_method.upper() == "POST":
try:
data = self.session.post(url, headers=self.headers, data=dumps(body)).json()
except:
self.print_now("请求发送失败,可能为网络异常")
# data = self.session.post(url, headers=self.headers, data=dumps(body)).text
return data
elif req_method.upper() == "OTHER":
try:
self.session.get(url, headers=self.headers, params=dumps(body))
except:
self.print_now("请求发送失败,可能为网络异常")
else:
self.print_now("您当前使用的请求方式有误,请检查")
def timestamp(self, short=False):
if (short):
return int(time())
return int(time() * 1000)
def md5(self, str):
m = md5Encode(str.encode(encoding='utf-8'))
return m.hexdigest()
def uuid(self, num, upper=False):
str = ''
if upper:
for i in range(num):
str += choice(digits + ascii_lowercase + ascii_uppercase)
else:
for i in range(num):
str += choice(digits + ascii_lowercase)
return str
def pushplus(self, title, content):
url = "http://www.pushplus.plus/send"
headers = {
"Content-Type": "application/json"
}
data = {
"token": pushplus_token,
"title": title,
"content": content
}
try:
post(url, headers=headers, data=dumps(data))
except:
self.print_now('推送失败')
def tgpush(self, content):
url = f"https://api.telegram.org/bot{tgbot_token}/sendMessage"
if tg_push_api != "":
url = f"https://{tg_push_api}/bot{tgbot_token}/sendMessage"
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
data = {'chat_id': str(tg_userId), 'text': content, 'disable_web_page_preview': 'true'}
try:
post(url, headers=headers, data=data, timeout=10)
except:
self.print_now('推送失败')
def print_now(self, content):
print(content)
stdout.flush()
def get_dfp_params(self):
get_params_url = "https://api.lomoruirui.com/iqiyi/get_dfp"
data = get(get_params_url).json()
return data
def get_dfp(self):
body = self.get_dfp_params()
url = "https://cook.iqiyi.com/security/dfp_pcw/sign"
headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Length": "1059",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "cook.iqiyi.com",
"Origin": "https://www.iqiyi.com",
"Pragma": "no-cache",
"Referer": "https://www.iqiyi.com/",
"sec-ch-ua": f"\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"{body['data']['sv']}\", \"Google Chrome\";v=\"{body['data']['sv']}\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "Windows",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-site",
"User-Agent": self.user_agent
}
data = post(url, headers=headers, data=body["data"]["body"]).json()
self.dfp = data["result"]["dfp"]
self.print_now(self.dfp)
def get_userinfo(self):
url = f"https://tc.vip.iqiyi.com/growthAgency/v2/growth-aggregation?messageId={self.qyid}&platform=97ae2982356f69d8&P00001={self.ck}&responseNodes=duration%2Cgrowth%2Cupgrade%2CviewTime%2CgrowthAnnualCard&_={self.timestamp()}"
data = self.req(url)
msg = data['data']['growth']
try:
self.user_info = f"查询成功: 到期时间{msg['deadline']}\t当前等级为{msg['level']}\n\t今日获得成长值{msg['todayGrowthValue']}\t总成长值{msg['growthvalue']}\t距离下一等级还差{msg['distance']}成长值"
self.print_now(self.user_info)
except:
self.user_info = f"查询失败,未获取到用户信息"
"""获取用户id"""
def getUid(self):
url = f'https://passport.iqiyi.com/apis/user/info.action?authcookie={self.ck}&fields=userinfo%2Cqiyi_vip&timeout=15000'
data = self.req(url)
if data.get("code") == 'A00000':
self.uid = data['data']['userinfo']['pru']
else:
self.print_now("请求api失败 最大可能是cookie失效了 也可能是网络问题")
self.tgpush("爱奇艺每日任务: 请求api失败 最大可能是cookie失效了 也可能是网络问题")
exit(0)
def get_watch_time(self):
url = "https://tc.vip.iqiyi.com/growthAgency/watch-film-duration"
data = self.req(url)
watch_time = data['data']['viewtime']['time']
return watch_time
def get_sign(self):
self.qyid = self.md5(self.uuid(16))
time_stamp = self.timestamp()
if self.uid == "":
self.print_now("获取用户id失败 可能为cookie设置错误或者网络异常,请重试或者检查cookie")
exit(0)
data = f'agentType=1|agentversion=1|appKey=basic_pcw|authCookie={self.ck}|qyid={self.qyid}|task_code=natural_month_sign|timestamp={time_stamp}|typeCode=point|userId={self.uid}|UKobMjDMsDoScuWOfp6F'
url = f'https://community.iqiyi.com/openApi/task/execute?agentType=1&agentversion=1&appKey=basic_pcw&authCookie={self.ck}&qyid={self.qyid}&sign={self.md5(data)}&task_code=natural_month_sign&timestamp={time_stamp}&typeCode=point&userId={self.uid}'
return url
def getUrl(self, Time, dfp):
return f'https://msg.qy.net/b?u=f600a23f03c26507f5482e6828cfc6c5&pu={self.uid}&p1=1_10_101&v=5.2.66&ce={self.uuid(32)}&de=1616773143.1639632721.1639653680.29&c1=2&ve={self.uuid(32)}&ht=0&pt={randint(1000000000, 9999999999) / 1000000}&isdm=0&duby=0&ra=5&clt=&ps2=DIRECT&ps3=&ps4=&br=mozilla%2F5.0%20(windows%20nt%2010.0%3B%20win64%3B%20x64)%20applewebkit%2F537.36%20(khtml%2C%20like%20gecko)%20chrome%2F96.0.4664.110%20safari%2F537.36&mod=cn_s&purl=https%3A%2F%2Fwww.iqiyi.com%2Fv_1eldg8u3r08.html%3Fvfrm%3Dpcw_home%26vfrmblk%3D712211_cainizaizhui%26vfrmrst%3D712211_cainizaizhui_image1%26r_area%3Drec_you_like%26r_source%3D62%2540128%26bkt%3DMBA_PW_T3_53%26e%3Db3ec4e6c74812510c7719f7ecc8fbb0f%26stype%3D2&tmplt=2&ptid=01010031010000000000&os=window&nu=0&vfm=&coop=&ispre=0&videotp=0&drm=&plyrv=&rfr=https%3A%2F%2Fwww.iqiyi.com%2F&fatherid={randint(1000000000000000, 9999999999999999)}&stauto=1&algot=abr_v12-rl&vvfrom=&vfrmtp=1&pagev=playpage_adv_xb&engt=2&ldt=1&krv=1.1.85&wtmk=0&duration={randint(1000000, 9999999)}&bkt=&e=&stype=&r_area=&r_source=&s4={randint(100000, 999999)}_dianshiju_tbrb_image2&abtest=1707_B%2C1550_B&s3={randint(100000, 999999)}_dianshiju_tbrb&vbr={randint(100000, 999999)}&mft=0&ra1=2&wint=3&s2=pcw_home&bw=10&ntwk=18&dl={randint(10, 999)}.27999999999997&rn=0.{randint(1000000000000000, 9999999999999999)}&dfp={dfp}&stime={self.timestamp()}&r={randint(1000000000000000, 9999999999999999)}&hu=1&t=2&tm={Time}&_={self.timestamp()}'
def sign(self):
url = self.get_sign()
body = {
"natural_month_sign": {
"taskCode": "iQIYI_mofhr",
"agentType": 1,
"agentversion": 1,
"authCookie": self.ck,
"qyid": self.qyid,
"verticalCode": "iQIYI"
}
}
data = self.req(url, "post", body)
# print(data)
if data.get('code') == 'A00000':
self.print_now(f"签到执行成功, {data['data']['msg']}")
else:
self.print_now("签到失败,原因可能是签到接口又又又又改了")
def dailyTask(self):
taskcodeList = {
'b6e688905d4e7184': "浏览生活福利",
'a7f02e895ccbf416': "看看热b榜",
'8ba31f70013989a8': "每日观影成就",
"freeGetVip": "浏览会员兑换活动",
"GetReward": "逛领福利频道"}
for taskcode in taskcodeList:
# 领任务
url = f'https://tc.vip.iqiyi.com/taskCenter/task/joinTask?P00001={self.ck}&taskCode={taskcode}&platform=b6c13e26323c537d&lang=zh_CN&app_lm=cn'
if self.req(url)['code'] == 'A00000':
# print(f'领取{taskcodeList[taskcode]}任务成功')
sleep(10)
# 完成任务
url = f'https://tc.vip.iqiyi.com/taskCenter/task/notify?taskCode={taskcode}&P00001={self.ck}&platform=97ae2982356f69d8&lang=cn&bizSource=component_browse_timing_tasks&_={self.timestamp()}'
if self.req(url)['code'] == 'A00000':
# print(f'完成{taskcodeList[taskcode]}任务成功')
sleep(2)
# 领取奖励
# url = f'https://tc.vip.iqiyi.com/taskCenter/task/getTaskRewards?P00001={self.ck}&taskCode={taskcode}&dfp={self.dfp}&platform=b6c13e26323c537d&lang=zh_CN&app_lm=cn&deviceID={self.md5(self.uuid(8))}&token=&multiReward=1&fv=bed99b2cf5722bfe'
url = f"https://tc.vip.iqiyi.com/taskCenter/task/getTaskRewards?P00001={self.ck}&taskCode={taskcode}&lang=zh_CN&platform=b2f2d9af351b8603"
try:
price = self.req(url)['dataNew'][0]["value"]
self.print_now(f"领取{taskcodeList[taskcode]}任务奖励成功, 获得{price}点成长值")
except:
self.print_now(f"领取{taskcodeList[taskcode]}任务奖励可能出错了 也可能没出错 只是你今天跑了第二次")
sleep(5)
def lottery_draw(self, lottery=True):
"""
查询剩余抽奖次数和抽奖
True 抽
False 查
"""
url = "https://iface2.iqiyi.com/aggregate/3.0/lottery_activity"
lottery_params = {
"app_k": "0",
"app_v": "0",
"platform_id": 10,
"dev_os": "2.0.0",
"dev_ua": "COL-AL10",
"net_sts": 1,
"qyid": self.qyid,
"psp_uid": self.uid,
"psp_cki": self.ck,
"psp_status": 3,
"secure_v": 1,
"secure_p": "0",
"req_sn": self.timestamp()
}
# get_change_params = deepcopy(lottery_params)
# get_change_params["lottery_chance"] = 1
# params = get_change_params
# if lottery:
# params = lottery_params
params = lottery_params
data = self.req(url, "get", params)
# if lottery and data.get("code") == 0:
if data.get("code") == 0:
self.print_now(f'抽奖成功, 获得{data["awardName"]}')
return data["daysurpluschance"]
elif data.get("code") == 3:
self.print_now(f"抽奖成功, 但是获得奖励信息错误, 大概率是没用的开通会员优惠券")
return data["daysurpluschance"]
else:
return 0
# elif not lottery and data.get("code") == 0:
# return data["daysurpluschance"]
def start(self):
self.print_now("正在执行刷观影时长脚本 为减少风控 本过程运行时间较长 大概半个小时")
totalTime = self.get_watch_time()
if totalTime >= 7200:
self.print_now(f"你的账号今日观影时长大于2小时 不执行刷观影时长")
return
for i in range(150):
Time = randint(60, 120)
url = self.getUrl(Time, self.dfp)
self.req(url, 'other')
totalTime += Time
sleep(randint(20, 40))
if i % 20 == 3:
self.print_now(f"现在已经刷到了{totalTime}秒, 数据同步有延迟, 仅供参考")
if totalTime >= 7600:
break
def main(self):
if get_iqiyi_dfp:
self.get_dfp()
self.getUid()
self.get_sign()
self.start()
for i in range(10):
change = self.lottery_draw()
if int(change) == 0:
break
sleep(3)
self.sign()
self.dailyTask()
self.print_now(f"任务已经执行完成, 因爱奇艺观影时间同步较慢,这里等待3分钟再查询今日成长值信息,若不需要等待直接查询,请设置环境变量名 sleep_await = 0 默认为等待")
if int(self.sleep_await) == 1:
sleep(180)
self.get_userinfo()
if pushplus_token != "":
self.pushplus("爱奇艺每日任务签到", self.user_info)
if tgbot_token != "" and tg_userId != "":
self.tgpush(self.user_info)
if __name__ == '__main__':
iqiyi = Iqiyi(iqy_ck, iqiyi_dfp)
iqiyi.main()

22
meituanV3.js Normal file

File diff suppressed because one or more lines are too long

15
naixue.js Normal file

File diff suppressed because one or more lines are too long

20
sfsyV2.js Normal file

File diff suppressed because one or more lines are too long

28
txspfl.js Normal file

File diff suppressed because one or more lines are too long

230
tyyun.py Normal file
View File

@@ -0,0 +1,230 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# @Time : 2023/4/8 9:23
#作者https://www.52pojie.cn/forum.php?mod=viewthread&tid=1784111&highlight=%C7%A9%B5%BD
# -------------------------------
# cron "30 4 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('天翼云盘签到');
# #!/usr/bin/python3
# # -- coding: utf-8 --
# # @Time : 2023/4/4 9:23
# #作者https://www.52pojie.cn/thread-1231190-1-1.html
# # -------------------------------
# # cron "30 4 * * *" script-path=xxx.py,tag=匹配cron用
# # const $ = new Env('天翼云盘签到');
#
import time
import re
import json
import base64
import hashlib
import urllib.parse, hmac
import rsa
import requests
import random
import os
# 变量 ty_username手机号,ty_password密码
ty_username = os.getenv("ty_username").split('&')
ty_password = os.getenv("ty_password").split('&')
# 推送加
plustoken = os.getenv("plustoken")
BI_RM = list("0123456789abcdefghijklmnopqrstuvwxyz")
B64MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
s = requests.Session()
for i in range(len(ty_username)):
print(f'开始执行帐号{i+1}')
#推送函数
def Push(contents):
# 推送加
headers = {'Content-Type': 'application/json'}
json = {"token": plustoken, 'title': '天翼云签到', 'content': contents.replace('\n', '<br>'), "template": "json"}
resp = requests.post(f'http://www.pushplus.plus/send', json=json, headers=headers).json()
print('push+推送成功' if resp['code'] == 200 else 'push+推送失败')
def int2char(a):
return BI_RM[a]
def b64tohex(a):
d = ""
e = 0
c = 0
for i in range(len(a)):
if list(a)[i] != "=":
v = B64MAP.index(list(a)[i])
if 0 == e:
e = 1
d += int2char(v >> 2)
c = 3 & v
elif 1 == e:
e = 2
d += int2char(c << 2 | v >> 4)
c = 15 & v
elif 2 == e:
e = 3
d += int2char(c)
d += int2char(v >> 2)
c = 3 & v
else:
e = 0
d += int2char(c << 2 | v >> 4)
d += int2char(15 & v)
if e == 1:
d += int2char(c << 2)
return d
def rsa_encode(j_rsakey, string):
rsa_key = f"-----BEGIN PUBLIC KEY-----\n{j_rsakey}\n-----END PUBLIC KEY-----"
pubkey = rsa.PublicKey.load_pkcs1_openssl_pem(rsa_key.encode())
result = b64tohex((base64.b64encode(rsa.encrypt(f'{string}'.encode(), pubkey))).decode())
return result
def calculate_md5_sign(params):
return hashlib.md5('&'.join(sorted(params.split('&'))).encode('utf-8')).hexdigest()
def login(ty_username, ty_password):
# https://m.cloud.189.cn/login2014.jsp?redirectURL=https://m.cloud.189.cn/zhuanti/2021/shakeLottery/index.html
url = ""
urlToken = "https://m.cloud.189.cn/udb/udb_login.jsp?pageId=1&pageKey=default&clientType=wap&redirectURL=https://m.cloud.189.cn/zhuanti/2021/shakeLottery/index.html"
s = requests.Session()
r = s.get(urlToken)
pattern = r"https?://[^\s'\"]+" # 匹配以http或https开头的url
match = re.search(pattern, r.text) # 在文本中搜索匹配
if match: # 如果找到匹配
url = match.group() # 获取匹配的字符串
# print(url) # 打印url
else: # 如果没有找到匹配
print("没有找到url")
r = s.get(url)
# print(r.text)
pattern = r"<a id=\"j-tab-login-link\"[^>]*href=\"([^\"]+)\"" # 匹配id为j-tab-login-link的a标签并捕获href引号内的内容
match = re.search(pattern, r.text) # 在文本中搜索匹配
if match: # 如果找到匹配
href = match.group(1) # 获取捕获的内容
# print("href:" + href) # 打印href链接
else: # 如果没有找到匹配
print("没有找到href链接")
r = s.get(href)
captchaToken = re.findall(r"captchaToken' value='(.+?)'", r.text)[0]
lt = re.findall(r'lt = "(.+?)"', r.text)[0]
returnUrl = re.findall(r"returnUrl= '(.+?)'", r.text)[0]
paramId = re.findall(r'paramId = "(.+?)"', r.text)[0]
j_rsakey = re.findall(r'j_rsaKey" value="(\S+)"', r.text, re.M)[0]
s.headers.update({"lt": lt})
username = rsa_encode(j_rsakey, ty_username[i])
password = rsa_encode(j_rsakey,ty_password[i])
url = "https://open.e.189.cn/api/logbox/oauth2/loginSubmit.do"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/76.0',
'Referer': 'https://open.e.189.cn/',
}
data = {
"appKey": "cloud",
"accountType": '01',
"userName": f"{{RSA}}{username}",
"password": f"{{RSA}}{password}",
"validateCode": "",
"captchaToken": captchaToken,
"returnUrl": returnUrl,
"mailSuffix": "@189.cn",
"paramId": paramId
}
r = s.post(url, data=data, headers=headers, timeout=5)
if (r.json()['result'] == 0):
print(r.json()['msg'])
else:
print(r.json()['msg'])
redirect_url = r.json()['toUrl']
r = s.get(redirect_url)
return s
def main():
s = login(ty_username, ty_password)
rand = str(round(time.time() * 1000))
surl = f'https://api.cloud.189.cn/mkt/userSign.action?rand={rand}&clientType=TELEANDROID&version=8.6.3&model=SM-G930K'
url = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN&activityId=ACT_SIGNIN'
url2 = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN_PHOTOS&activityId=ACT_SIGNIN'
url3 = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_2022_FLDFS_KJ&activityId=ACT_SIGNIN'
headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6',
"Referer": "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1",
"Host": "m.cloud.189.cn",
"Accept-Encoding": "gzip, deflate",
}
response = s.get(surl, headers=headers)
netdiskBonus = response.json()['netdiskBonus']
if (response.json()['isSign'] == "false"):
print(f"未签到,签到获得{netdiskBonus}M空间")
res1 = f"未签到,签到获得{netdiskBonus}M空间"
else:
print(f"已经签到过了,签到获得{netdiskBonus}M空间")
res1 = f"已经签到过了,签到获得{netdiskBonus}M空间"
headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6',
"Referer": "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1",
"Host": "m.cloud.189.cn",
"Accept-Encoding": "gzip, deflate",
}
response = s.get(url, headers=headers)
if ("errorCode" in response.text):
print(response.text)
res2 = ""
else:
description = response.json()['description']
print(f"抽奖获得{description}")
res2 = f"抽奖获得{description}"
response = s.get(url2, headers=headers)
if ("errorCode" in response.text):
print(response.text)
res3 = ""
else:
description = response.json()['description']
print(f"抽奖获得{description}")
res3 = f"抽奖获得{description}"
response = s.get(url3, headers=headers)
if ("errorCode" in response.text):
print(response.text)
res4 = ""
else:
description = response.json()['description']
print(f"链接3抽奖获得{description}")
res4 = f"链接3抽奖获得{description}"
message = res1+res2+res3+res4
Push(contents=message)
def lambda_handler(event, context): # aws default
main()
def main_handler(event, context): # tencent default
main()
def handler(event, context): # aliyun default
main()
if __name__ == "__main__":
time.sleep(random.randint(5, 30))
main()

50
xmly.py Normal file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# -------------------------------
# @Author : github@wd210010 https://github.com/wd210010/just_for_happy
# @Time : 2023/2/27 13:23
# -------------------------------
# cron "6 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('喜马拉雅签到')
import requests, json ,os
# 青龙变量 xmly_cookie
xmly_cookie = os.getenv("xmly_cookie").split('#')
for i in range(len(xmly_cookie)):
print(f'开始第{i + 1}个帐号签到')
url = 'https://hybrid.ximalaya.com/web-activity/signIn/v2/signIn?v=new '
headers = {
'Host': 'hybrid.ximalaya.com',
'Content-Type': 'application/json',
'Accept': '*/*',
'X-Xuid-Fp': 'FISDYy0YZLgYhwIObU0_rmpz5ZIWc2doY1AQZ8xlyQk8pafpgABxMiE5LjAuNDMh',
'Connection': 'keep-alive',
'Cookie': f'{xmly_cookie[i]}',
'User-Agent': 'ting_v9.0.87_c5(CFNetwork, iOS 15.6, iPhone14,5)',
'Content-Length': '10',
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
}
data='{"aid":87}'
html = requests.post(url=url, headers=headers, data=data)
result = json.loads(html.text)['data']['msg']
print(result)
m_url='https://m.ximalaya.com/business-vip-presale-mobile-web/page/ts-1671779856199?version=9.0.87'
m_headers={
'Host': 'm.ximalaya.com',
'Accept': 'application/json, text/plain, */*',
'Connection': 'keep-alive',
'Cookie': f'{xmly_cookie[i]}',
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 iting/9.0.87 kdtunion_iting/1.0 iting(main)/9.0.87/ios_1 ;xmly(main)/9.0.87/iOS_1',
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
'Referer': 'https://m.ximalaya.com/gatekeeper/business-xmvip/main?app=iting&version=9.0.87&impl=com.gemd.iting&orderSource=app_Other_MyPage_VipCard',
'Accept-Encoding': 'gzip, deflate, br',
}
m_html = requests.get(url=m_url, headers=m_headers)
m_result = json.loads(m_html.text)['data']['modules'][0]['userInfo']
info = 'ID: '+str(m_result['userId'])+ ' 用户名: '+ m_result['nickName']+ ' VIP到期日期: '+m_result['subtitle']
print(info)

45
xmly_10draw.py Normal file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/python3
# -- coding: utf-8 --
# -------------------------------
# @Author : github@wd210010 https://github.com/wd210010/just_for_happy
# @Time : 2023/2/27 13:23
# -------------------------------
# cron "6 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('喜马拉雅转盘抽奖')
import requests, json, time ,os
# 写的是喜马拉雅每日十连抽 十连抽一次抓包https://m.ximalaya.com/x-web-activity/draw/activity/drawTenAction这个域名的cookie
# 青龙变量 xmly_cookie
xmly_cookie = os.getenv("xmly_cookie").split('#')
for i in range(3):
url = 'https://m.ximalaya.com/x-web-activity/draw/activity/drawTenAction'
headers = {
'Cookie': f'{xmly_cookie}',
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 iting/9.1.3 kdtunion_iting/1.0 iting(main)/9.1.3/ios_1 ;xmly(main)/9.1.3/iOS_1',
}
data = {
'activityId': '2'
}
html = requests.post(url=url, headers=headers, data=data)
if str(json.loads(html.text)['data']['success']) == 'true':
awardslist = []
for j in range(len(json.loads(html.text)['data']['awards'])):
awards = son.loads(html.text)['data']['awards'][j]['description']
awardslist.append(awards)
print(
'抽奖成功! 获得奖品:' + '\n' + str(awardslist).replace('[', '').replace(']', '').replace(',', '\n').replace(
' ', '').replace('\'', ''))
else:
print(str(json.loads(html.text)['data']['errorMsg']))
time.sleep(5)
url2 = 'https://m.ximalaya.com/x-web-activity/draw/activity/receivingPercentAward'
html2 = requests.post(url=url2, headers=headers, data=data)
if str(json.loads(html2.text)['data']['success']) == 'true':
print('抽奖成功! ' + '获得奖品' + str(json.loads(html.text)['data']['awards']))
else:
print(str(json.loads(html2.text)['data']['errorMsg']))
time.sleep(5)

170
ysfqd.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long