aboutsummaryrefslogtreecommitdiff
path: root/src/scraping/buxton/scraper.py
diff options
context:
space:
mode:
authorfawn <fangrui_tong@brown.edu>2019-07-30 16:52:12 -0400
committerfawn <fangrui_tong@brown.edu>2019-07-30 16:52:12 -0400
commitf7c0948910182f5f6cb2c10c216994e2bc7b91b0 (patch)
tree6d443543c7475f4104bf7b8a3be788bb3ce2a3ec /src/scraping/buxton/scraper.py
parent78999b8b35267db9236bbb69e7e90e8691c59ba9 (diff)
parent8ca17d379ce7d3cc751408553b6819223d31a3e0 (diff)
merged
Diffstat (limited to 'src/scraping/buxton/scraper.py')
-rw-r--r--src/scraping/buxton/scraper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scraping/buxton/scraper.py b/src/scraping/buxton/scraper.py
index 182b22a1a..f0f45d8f9 100644
--- a/src/scraping/buxton/scraper.py
+++ b/src/scraping/buxton/scraper.py
@@ -139,7 +139,7 @@ def write_text_doc(content):
data_doc = {
"_id": data_doc_guid,
"fields": {
- "proto": protofy("commonImportProto"),
+ "proto": protofy("textProto"),
"data": {
"Data": '{"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"' + content + '"}]}]},"selection":{"type":"text","anchor":1,"head":1}' + '}',
"__type": "RichTextField"
@@ -235,8 +235,8 @@ def parse_document(file_name: str):
count += 1
view_guids.append(write_image(pure_name, image))
copyfile(dir_path + "/" + image, dir_path +
- "/" + image.replace(".", "_o.", 1))
- os.rename(dir_path + "/" + image, dir_path +
+ "/" + image.replace(".", "_o.", 1))
+ copyfile(dir_path + "/" + image, dir_path +
"/" + image.replace(".", "_m.", 1))
print(f"extracted {count} images...")