时间:2021-07-01 10:21:17 帮助过:69人阅读
javascript:var hashes = []; var list = $(".member_mention").get().filter(function (e) { var h = $(e).attr('data-hash'); if (hashes.indexOf(h) < 0) { hashes.push(h); return true } else { return false } }).sort(function (a, b) { var atext = $(a).text(), btext = $(b).text(); if (atext > btext) return 1; else if (atext < btext) return -1; return 0; }); var target = $($("#zh-question-detail")[0]).empty(); list.forEach(function (e) { target.append(e).append("
") }); void(0)
#coding=utf-8
import re
import urllib
def getCoder(url):
page = urllib.urlopen(url)
html = page.read()
rule = r'@.*?'
coderList = re.findall(rule,html)
for coderName in coderList:
print coderName
getCoder("http://www.zhihu.com/question/22576739")
知乎女程序员索引: