python 投票

2022/4/27 9:12:39

本文主要是介绍python 投票,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

import requests,sys,time,re
head1={'Host':'2865.litevote.com',
       'Content-Length':'60',
       'Accept':"application/json, text/plain, */*",'jwt':'',
       'User-Agent':'Mozilla/5.0 (Linux; Android 10; Redmi Note 8 Pro Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3211 MMWEBSDK/20210501 Mobile Safari/537.36 MMWEBID/2997 MicroMessenger/8.0.6.1900(0x28000653) Process/toolsmp WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64',
       'Content-Type':'application/json;charset=UTF-8','Origin':'http://2865.litevote.com','X-Requested-With':'com.tencent.mm','Referer':'http://2865.litevote.com/votes/?id=Mjg2NTo0MDAzNg&type=0',
       'Accept-Encoding':'gzip, deflate','Accept-Language':'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
       'Cookie':'Hm_lvt_7bd8ccc2fac7ab9c7ea2829ca3784fd0=1650932478; jwt_inner=G%2F4Lm6G36MIjJY8x6%2BaUIvFYPW%2ByQr81bXEl08GHqk%2BjiQq5pQukxYn8eFyNspdHT217WLjI%2FxAWj0I5xopDjtcRbyQLrNuvN84F8p5PyIvRY8T4x5oKNVrv7N6EUhhT7od2UpkArUJC9SvBM0IxoKus%2BjDsD5Jv1Hax9UBtO5uozzCeg%2B22QtzH%2BHruyohDAJb%2FcBB2DkTrGqWsAHVjy5tqGOCrLJfghfxb0aEGeEGvU0PydXU3wu0%2FYTIbFrdsfeUK6OlNypO7f0IcUc5q2xo6hyhs71Ec%2Bwb6pKxB9Jwb4PSrnEfZMYIyD56XVM%2F5R6xvhDM9kj5tRNnEDKUWuAqF6hBdnpv8fUzKg%2BwL%2FJs%3D; Hm_lpvt_7bd8ccc2fac7ab9c7ea2829ca3784fd0=1651009992'}
uu="MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
head1['User-Agent']=uu
session=requests.session()
url="http://2865.litevote.com/api/vote/submit"
url1="http://2865.litevote.com/api/vote/options?id=2865&page=1&size=10&keyword=50&isPreview=0"
url2="http://2865.litevote.com/api/vote/options?id=2865&page=1&size=10&keyword=&isPreview=0"
tt1=int(time.time())
head1["Cookie"]='Hm_lvt_7bd8ccc2fac7ab9c7ea2829ca3784fd0='+str(tt1)+'; jwt_inner=G%2F4Lm6G36MIjJY8x6%2BaUIvFYPW%2ByQr81bXEl08GHqk%2BjiQq5pQukxYn8eFyNspdHT217WLjI%2FxAWj0I5xopDjtcRbyQLrNuvN84F8p5PyIvRY8T4x5oKNVrv7N6EUhhT7od2UpkArUJC9SvBM0IxoKus%2BjDsD5Jv1Hax9UBtO5uozzCeg%2B22QtzH%2BHruyohDAJb%2FcBB2DkTrGqWsAHVjy5tqGOCrLJfghfxb0aEGeEGvU0PydXU3wu0%2FYTIbFrdsfeUK6OlNypO7f0IcUc5q2xo6hyhs71Ec%2Bwb6pKxB9Jwb4PSrnEfZMYIyD56XVM%2F5R6xvhDM9kj5tRNnEDKUWuAqF6hBdnpv8fUzKg%2BwL%2FJs%3D; Hm_lpvt_7bd8ccc2fac7ab9c7ea2829ca3784fd0='+str(tt1+20000)
shuju={
    "id": "Mjg2NTo0MDAzNg",
    "option_ids": ["85093"],
    "isPreview": 0
}
shuju1={
    "id": "Mjg2NTo0MDAzNg",
    "option_ids": ["84993"],
    "isPreview": 0
}
aa=session.post(url=url,json=shuju,headers=head1)
aaa=requests.get(url2,headers=head1)

 



这篇关于python 投票的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程