I'm trying to get last value of symbol list from yahoo finance using thread in python. I read thread documentary however i don't understand that concept
#!/usr/bin/python
from threading import Thread
import urllib
import re
def th(ur):
base = 'https://finance.yahoo.com/q?s='+ur
htmlfile = urllib.urlopen(base).read()
regex = '<span id="yfs_l84_[^.]*">(.+?)</span>'
result = re.findall(regex,htmlfile)
print result[0]
symbollist = open("symbollist.txt").read().splitlines()
threadlist = []
for u in symbollist:
t = Thread(target=th,args=(u,))
t.start()
threadlist.append(t)
for b in threadlist:
b.join()