mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
use the uncanonicalized url as part of the sha1 input to generate the page id, since canonicalization was stripping off the #fragment, and we might want to crawl the same url with different fragments (and there's no option to GoogleURLCanonicalizer to not strip the fragment)
This commit is contained in:
parent
dd8f0d525d
commit
568a553432
@ -105,8 +105,7 @@ class Page(brozzler.BaseDictable):
|
||||
if id is not None:
|
||||
self.id = id
|
||||
else:
|
||||
digest_this = "site_id:{},canon_url:{}".format(
|
||||
self.site_id, self.canon_url())
|
||||
digest_this = "site_id:{},url:{}".format(self.site_id, self.url)
|
||||
self.id = hashlib.sha1(digest_this.encode("utf-8")).hexdigest()
|
||||
|
||||
def __repr__(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user