mirror of
https://github.com/aljazceru/IngestRSS.git
synced 2026-02-23 07:04:32 +01:00
Fixing metadata for s3
This commit is contained in:
@@ -62,8 +62,21 @@ def s3_save_article(article:dict):
|
||||
json.dump(article, f)
|
||||
|
||||
try:
|
||||
s3.upload_file(file_path, CONTENT_BUCKET, file_key)
|
||||
|
||||
s3.upload_file(file_path,
|
||||
CONTENT_BUCKET,
|
||||
file_key,
|
||||
ExtraArgs={
|
||||
"Metadata":
|
||||
{
|
||||
"rss": article.get("rss", ""),
|
||||
"title": article.get("title", ""),
|
||||
"unixTime": str(article.get("unixTime", "")),
|
||||
"article_id": article.get("article_id", ""),
|
||||
"link": article.get("link", ""),
|
||||
"rss_id": article.get("rss_id", "")
|
||||
}
|
||||
}
|
||||
)
|
||||
logger.info(f"Saved article {article_id} to S3 bucket {CONTENT_BUCKET}")
|
||||
|
||||
except Exception as e:
|
||||
|
||||
2
todo.md
2
todo.md
@@ -1,6 +1,6 @@
|
||||
# Before Public Launch
|
||||
* Rethink Partitioning Strategy [Done]
|
||||
* Implement New Partitioning Strategy. [Next]
|
||||
* Implement New Partitioning Strategy. [Done]
|
||||
- Incorporate: All the json data except for content and link.
|
||||
Partitioning Strategy: {Year}/{Month}/{Day}/{article_id}
|
||||
* API Tool - to Pull data that you have down.
|
||||
|
||||
Reference in New Issue
Block a user