Skip to content

Instantly share code, notes, and snippets.

@bindog
Last active August 29, 2015 14:07
import requests
import re
r = requests.get("http://weibo.com/rmrb")
p_nick = re.compile(r"CONFIG\['onick'\]='(.*?)'")
m_nick = re.findall(p_nick,r.text)
if len(m_nick) == 1:
print m_nick[0]
else:
print "Not found!"
#输出
#Not found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment