mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-23 16:19:49 -05:00
fix 'CrawlUrl' object has no attribute 'priority' bug
This commit is contained in:
parent
4022cc0162
commit
32abfcac8a
@ -18,7 +18,7 @@ class CrawlUrl:
|
||||
self.priority_key = (priority << 32) | (hash(self.url) & (2**32 - 1))
|
||||
|
||||
def get_priority(self):
|
||||
return self.priority >> 32
|
||||
return self.priority_key >> 32
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
@ -29,8 +29,8 @@ class CrawlUrl:
|
||||
class Frontier:
|
||||
def __init__(self):
|
||||
# {url:CrawlUrl}
|
||||
self.urls = {}
|
||||
|
||||
self.urls = {}
|
||||
|
||||
# {host:SortedDict{priority_key:CrawlUrl}}
|
||||
self.queues_by_host = {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user