forked from NaroisCool/naro-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path租号玩.py
43 lines (39 loc) · 1.47 KB
/
租号玩.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#租号玩自动上线下线擦亮卖家出租号
import requests
import os
import time
def offRent():
url = 'https://www.zuhaowan.com/Account/offRent.html'
cookie = os.environ['ZuHaoWan']
headers = {
'Accept': '*/*',
'X-Requested-With': 'XMLHttpRequest',
'Accept-Language': 'zh-cn',
'Accept-Encoding': 'gzip, deflate, br',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
'Connection': 'keep-alive',
'Cookie': cookie
}
res = requests.post(url=url, headers=headers, data='id=10284948&accountsign=')
print(res.json().get('message'))
def onRent():
url = 'https://www.zuhaowan.com/Account/onRent.html'
cookie = os.environ['ZuHaoWan']
headers = {
'Accept': '*/*',
'X-Requested-With': 'XMLHttpRequest',
'Accept-Language': 'zh-cn',
'Accept-Encoding': 'gzip, deflate, br',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
'Connection': 'keep-alive',
'Cookie': cookie
}
res = requests.post(url=url, headers=headers, data='id=10284948&accountsign=')
print(res.json().get('message'))
if __name__ == '__main__':
offRent()
time.sleep(2)
onRent()
#sold_out()