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):
115
115
return None
116
116
117
117
for line in lines :
118
- fields = line .strip ().split (',' )
118
+ fields = line .decode ( 'utf-8' ). strip ().split (',' )
119
119
for i , field in enumerate (fields ):
120
120
if field [- 2 :] == '%"' :
121
121
data [header [i ]].append (float (field .strip ('"%' )))
@@ -252,7 +252,7 @@ def get_components_yahoo(idx_sym):
252
252
#break when no new components are found
253
253
while (True in mask ):
254
254
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 ().
256
256
strip ('"' ).split ('"\r \n "' ))
257
257
258
258
lines = [line .strip ().split ('","' ) for line in lines ]
You can’t perform that action at this time.
0 commit comments