我有一个股票网站爬虫的列表,长这样:
[......', 'xlnx>XLNX<', 'yhoo>YHOO<']
我该如何得到只带引号的字典?我知道这很简单,但我需要一些帮助。谢谢。
我该如何得到只带引号的字典?我知道这很简单,但我需要一些帮助。谢谢。
import urllib
import re
base_url = 'http://www.nasdaq.com/markets/indices/nasdaq-100.aspx'
content = urllib.urlopen(base_url).read()
list = re.findall('http://www.nasdaq.com/symbol/(.*)/a>', content)
print list