mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 23:09:01 +00:00
Elasticsearch export to csv
This commit is contained in:
12
database.py
12
database.py
@@ -218,6 +218,18 @@ class Database:
|
||||
|
||||
return page
|
||||
|
||||
def join_website_on_scan(self, docs: list):
|
||||
|
||||
websites = self.get_all_websites()
|
||||
|
||||
for doc in docs:
|
||||
if doc["_source"]["website_id"] in websites:
|
||||
doc["_source"]["website_url"] = websites[doc["_source"]["website_id"]]
|
||||
else:
|
||||
doc["_source"]["website_url"] = "[DELETED]"
|
||||
|
||||
yield doc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user