Skip to content

Instantly share code, notes, and snippets.

@jactry
Created January 2, 2016 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jactry/a82c883d2131b1bcceb9 to your computer and use it in GitHub Desktop.
Save jactry/a82c883d2131b1bcceb9 to your computer and use it in GitHub Desktop.
diff --git a/wdf.py b/wdf.py
index 69f264c..18908fe 100644
--- a/wdf.py
+++ b/wdf.py
@@ -87,7 +87,7 @@ def showQRImage():
def waitForLogin():
global tip, redirect_uri
- url = 'http://wx.qq.com/cgi-bin/mmwebwx-bin/login?tip=%s&uuid=%s&_=%s' % (tip, uuid, int(time.time()))
+ url = 'http://wx2.qq.com/cgi-bin/mmwebwx-bin/login?tip=%s&uuid=%s&_=%s' % (tip, uuid, int(time.time()))
request = urllib2.Request(url = url)
response = urllib2.urlopen(request)
@@ -165,7 +165,7 @@ def login():
def webwxinit():
- url = 'http://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?pass_ticket=%s&skey=%s&r=%s' % (pass_ticket, skey, int(time.time()))
+ url = 'http://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit?pass_ticket=%s&skey=%s&r=%s' % (pass_ticket, skey, int(time.time()))
params = {
'BaseRequest': BaseRequest
}
@@ -197,9 +197,9 @@ def webwxinit():
return True
def webwxgetcontact():
-
- url = 'http://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?pass_ticket=%s&skey=%s&r=%s' % (pass_ticket, skey, int(time.time()))
+ # url = 'http://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit?pass_ticket=%s&skey=%s&r=%s' % (pass_ticket, skey, int(time.time()))
+ url = 'https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?r=%s&seq=0&skey=%s' % (int(time.time()), skey)
request = urllib2.Request(url = url)
request.add_header('ContentType', 'application/json; charset=UTF-8')
response = urllib2.urlopen(request)
@logicmd
Copy link

logicmd commented Jan 3, 2016

PO 主可以打一个 pull request 回去啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment