aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scraping/buxton/scraper.py2
-rw-r--r--src/server/index.ts8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/scraping/buxton/scraper.py b/src/scraping/buxton/scraper.py
index 8ff7cb223..f0f45d8f9 100644
--- a/src/scraping/buxton/scraper.py
+++ b/src/scraping/buxton/scraper.py
@@ -237,8 +237,6 @@ def parse_document(file_name: str):
copyfile(dir_path + "/" + image, dir_path +
"/" + image.replace(".", "_o.", 1))
copyfile(dir_path + "/" + image, dir_path +
- "/" + image)
- os.rename(dir_path + "/" + image, dir_path +
"/" + image.replace(".", "_m.", 1))
print(f"extracted {count} images...")
diff --git a/src/server/index.ts b/src/server/index.ts
index 281fc1eb2..1912cf5c1 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -205,6 +205,10 @@ async function getDocs(id: string) {
if (field.__type === "proxy" || field.__type === "prefetch_proxy") {
ids.push(field.fieldId);
+ } else if (field.__type === "script" || field.__type === "computed") {
+ if (field.captures) {
+ ids.push(field.captures.fieldId);
+ }
} else if (field.__type === "list") {
ids.push(...fn(field));
} else if (typeof field === "string") {
@@ -293,6 +297,10 @@ app.post("/uploadDoc", (req, res) => {
if (field.__type === "proxy" || field.__type === "prefetch_proxy") {
field.fieldId = getId(field.fieldId);
+ } else if (field.__type === "script" || field.__type === "computed") {
+ if (field.captures) {
+ field.captures.fieldId = getId(field.captures.fieldId);
+ }
} else if (field.__type === "list") {
mapFn(field);
} else if (typeof field === "string") {