FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Source-Code-from-Tutorials/Python/24_python.py at master · sofitech05/Source-Code-from-Tutorials · GitHub
sofitech05
/
Source-Code-from-Tutorials
Public
forked from
buckyroberts/Source-Code-from-Tutorials
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Source-Code-from-Tutorials
/
Python
/
24_python.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (13 loc) · 450 Bytes
Breadcrumbs
Source-Code-from-Tutorials
/
Python
/
24_python.py
Copy path
File metadata and controls
16 lines (13 loc) · 450 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from
urllib
import
request
goog_url
=
http
:
//
real
-
chart
.
finance
.
yahoo
.
com
/
table
.
csv
?
s
=
GOOG
&
d
=
2
&
e
=
8
&
f
=
2015
&
g
=
d
&
a
=
2
&
b
=
27
&
c
=
2014
&
ignore
=
.
csv
def
download_stock_data
(
csv_url
):
response
=
request
.
urlopen
(
csv_url
)
csv
=
response
.
read
()
csv_str
=
str
(
csv
)
lines
=
csv_str
.
split
(
"
\\
n"
)
dest_url
=
r'goog.csv'
fx
=
open
(
dest_url
,
"w"
)
for
line
in
lines
:
fx
.
write
(
line
+
"
\n
"
)
fx
.
close
()
download_stock_data
(
goog_url
)
Back
|
FazBrowse Home
|
New Git URL