Commit f72bccf1 authored by lixiaofang's avatar lixiaofang

hh

parent 06f98178
This diff is collapsed.
......@@ -9,24 +9,25 @@ cookies = {
"sessionid": '1',
}
s = requests.session()
s.keep_alive = False
requests.adapters.DEFAULT_RETRIES = 5
auto_click_url = "http://earth.igengmei.com/api/v1/like"
login_url = "http://earth.igengmei.com/api/account/login_pwd"
def index_first():
r1=requests.get(login_url)
return r1.cookies.get_dict()
def login(cookies,user,pwd):
post_dict={
'account_type':user,
'pwd':pwd
......@@ -50,6 +51,7 @@ def dz(cookies_get, id):
print(response.text, 'url')
def time_conv(numtime):
now = datetime.datetime.now()
yes_time = now - datetime.timedelta(days=numtime)
yes_time_str = yes_time.strftime('%Y-%m-%d')
......@@ -95,9 +97,13 @@ if __name__ == "__main__":
#user_id=majia[num]
# cookies = index_first()
cookies = index_first()
user='s_abZ59C@shadow.com'
pwd=123456
# login(cookies,user=cookies,pwd='')
login(cookies,user=user,pwd=pwd)
dz(cookies, id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment