mediacloud / metadata-lib

How Media Cloud approaches extracting metadata from online news stories
Apache License 2.0
12 stars 5 forks source link

centralize url unique hash generation with helper method in this package #70

Closed rahulbot closed 11 months ago

rahulbot commented 11 months ago

Various places across our repos need to generate the unique hash for a URL. This adds a small unique_url_hash helper method and a new property (same name) returned from calls to extract. Based on idea proposed in https://github.com/mediacloud/story-indexer/issues/194#issuecomment-1853160060, mostly because it only took about 5 minutes and made sense to me. Very open to counter-arguments about whether this is the right place.

rahulbot commented 11 months ago

(prob should have rebased instead of pulling in main, but 🤷🏽‍♂️)