projects
/
harrypotter-wikipedia-cdsw
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated code to handle printing on windows
[harrypotter-wikipedia-cdsw]
/
build_hpwp_dataset.py
diff --git
a/build_hpwp_dataset.py
b/build_hpwp_dataset.py
index 62f7e4fd447bafbff39b4c8d78f9fe149c0efd87..9d381ae1e1a66b4e5904940c00f3d56791d4a53a 100644
(file)
--- a/
build_hpwp_dataset.py
+++ b/
build_hpwp_dataset.py
@@
-1,6
+1,7
@@
#!/usr/bin/env python
# coding=utf-8
#!/usr/bin/env python
# coding=utf-8
+import encoding_fix
import requests
# get_article_revisions is a function that takes an article title in
import requests
# get_article_revisions is a function that takes an article title in
@@
-107,6
+108,7
@@
for article in articles:
# first grab the article's title
title = article["a"]["title"]
# first grab the article's title
title = article["a"]["title"]
+ print(title)
# get the list of revisions from our function and then iterate through it,
# printing it to our output file
# get the list of revisions from our function and then iterate through it,
# printing it to our output file
Benjamin Mako Hill
||
Want to submit a patch?