Skip to content

Instantly share code, notes, and snippets.

@xjoker
Created September 19, 2016 14:46
Show Gist options
  • Save xjoker/958d777a3c8941637c034408ed018eb8 to your computer and use it in GitHub Desktop.
Save xjoker/958d777a3c8941637c034408ed018eb8 to your computer and use it in GitHub Desktop.
m-Team 简单签到
# encoding:utf-8
import requests
import time
username = ''
password = ''
lgurl = 'https://tp.m-team.cc/takelogin.php'
hdr = {'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36'}
headers = {
'origin': "https://tp.m-team.cc",
'accept-encoding': "gzip, deflate, br",
'accept-language': "zh-CN,zh;q=0.8",
'upgrade-insecure-requests': "1",
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.27 Safari/537.36",
'content-type': "application/x-www-form-urlencoded",
'accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
'cache-control': "no-cache",
'referer': "https://tp.m-team.cc/login.php",
'connection': "keep-alive"
}
post_data = {'username':username, 'password':password }
s=requests.Session()
s.post(lgurl,post_data,headers=headers)
r=s.get("https://tp.m-team.cc/usercp.php")
output = open('m-team.log', 'w+')
output.write(time.strftime("%Y-%m-%d %H:%M:%S"))
output.write("\r\n")
output.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment