File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ def get_quote_yahoo(symbols):
115115 return None
116116
117117 for line in lines :
118- fields = line .strip ().split (',' )
118+ fields = line .decode ( 'utf-8' ). strip ().split (',' )
119119 for i , field in enumerate (fields ):
120120 if field [- 2 :] == '%"' :
121121 data [header [i ]].append (float (field .strip ('"%' )))
@@ -252,7 +252,7 @@ def get_components_yahoo(idx_sym):
252252 #break when no new components are found
253253 while (True in mask ):
254254 urlStr = url .format (idx_mod , stats , comp_idx )
255- lines = (urllib .urlopen (urlStr ).read ().strip ().
255+ lines = (urllib .urlopen (urlStr ).read ().decode ( 'utf-8' ). strip ().
256256 strip ('"' ).split ('"\r \n "' ))
257257
258258 lines = [line .strip ().split ('","' ) for line in lines ]
You can’t perform that action at this time.
0 commit comments