Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abeglova committed Jan 3, 2025
1 parent cc0be65 commit 104a217
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions learning_resources/etl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,17 @@ def documents_from_olx(
filebytes = f.read()

mimetype = mimetypes.types_map.get(extension_lower)
checksum = md5(filebytes).hexdigest() # noqa: S324

yield (
filebytes,
{
"key": f"{path}/{filename}",
"key": checksum,
"content_type": CONTENT_TYPE_FILE,
"mime_type": mimetype,
"checksum": md5(filebytes).hexdigest(), # noqa: S324
"checksum": checksum,
"file_extension": extension_lower,
"source_path": path,
"source_path": f"{path}/{filename}",
},
)

Expand Down

0 comments on commit 104a217

Please sign in to comment.