This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import cookielib | |
import urllib | |
import urllib2 | |
import re | |
url_login = 'http://f.10086.cn/im/login/inputpasssubmit1.action' | |
url_logout = 'http://f.10086.cn//im/index/logoutsubmit.action?t=' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
王 | |
江 | |
周 | |
胡 | |
刘 | |
李 | |
吴 | |
毛 | |
温 | |
习 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decode(loca) { | |
var result = [], url = ""; | |
var line, rows, extra; | |
loca = loca.trim(); | |
if(loca === "") { | |
return ""; | |
} | |
line = Number(loca[0]); | |
rows = Math.floor((loca.length - 1) / line); | |
extra = (loca.length - 1) % line; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
def xiami_decode(s): | |
s = s.strip() | |
if not s: | |
return False | |
result = [] | |
line = int(s[0]) | |
rows = len(s[1:]) / line | |
extra = len(s[1:]) % line |