37,743
社区成员




identity = driver.find_elements_by_xpath("//a[@class='W_texta W_fb']")
identity = driver.find_elements_by_xpath("//a[@class='W_texta W_fb']")
pattern = re.compile("http://weibo.com/(.*?)\?")
items = re.findall(pattern, identity[0].text)
print items
如果是这样写是正确的吗?但是这样输不出任何东西
import re
string = "aaaaaaaaaaahttp://weibo.com/abcde?bbbbbbbbbbbbbb"
pattern = re.compile("http://weibo.com/(.*?)\?")
items = re.findall(pattern, string)
print(items)