FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-web-scraping-tutorial/csv_scraper.py at master · kjam/python-web-scraping-tutorial · GitHub
kjam
/
python-web-scraping-tutorial
Public
Notifications
You must be signed in to change notification settings
Fork
177
Star
215
Code
Issues
1
Pull requests
2
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-web-scraping-tutorial
/
csv_scraper.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
10 lines (9 loc) · 401 Bytes
Breadcrumbs
python-web-scraping-tutorial
/
csv_scraper.py
Copy path
File metadata and controls
10 lines (9 loc) · 401 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
from
csv
import
DictReader
from
datetime
import
datetime
with
open
(
'data/schedule.csv'
)
as
document
:
reader
=
DictReader
(
document
)
for
row
in
reader
:
day
=
datetime
.
strptime
(
row
.
get
(
'START_DATE'
),
'%m/%d/%y'
)
if
'PNC'
in
row
.
get
(
'LOCATION'
)
and
day
.
weekday
()
>
4
:
print
'HOME WEEKEND GAME!! %s on %s'
%
(
row
.
get
(
'SUBJECT'
),
row
.
get
(
'START_DATE'
))
Back
|
FazBrowse Home
|
New Git URL