mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-12-08 06:09:48 +00:00
adjust name
This commit is contained in:
parent
4c59c6d70e
commit
f7c0adacf3
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ export enum QueueState {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
const normalizeOpts: Options = {
|
const normalizeUrlOpts: Options = {
|
||||||
defaultProtocol: "https",
|
defaultProtocol: "https",
|
||||||
stripAuthentication: false,
|
stripAuthentication: false,
|
||||||
stripTextFragment: false,
|
stripTextFragment: false,
|
||||||
|
|
@ -699,7 +699,7 @@ return inx;
|
||||||
}: QueueEntry,
|
}: QueueEntry,
|
||||||
limit = 0,
|
limit = 0,
|
||||||
) {
|
) {
|
||||||
url = normalizeUrl(url, normalizeOpts);
|
url = normalizeUrl(url, normalizeUrlOpts);
|
||||||
const added = this._timestamp();
|
const added = this._timestamp();
|
||||||
const data: QueueEntry = { added, url, seedId, depth, extraHops };
|
const data: QueueEntry = { added, url, seedId, depth, extraHops };
|
||||||
|
|
||||||
|
|
@ -1025,7 +1025,7 @@ return inx;
|
||||||
}
|
}
|
||||||
|
|
||||||
async addIfNoDupe(key: string, url: string, status: number) {
|
async addIfNoDupe(key: string, url: string, status: number) {
|
||||||
url = normalizeUrl(url, normalizeOpts);
|
url = normalizeUrl(url, normalizeUrlOpts);
|
||||||
return (
|
return (
|
||||||
(await this.redis.sadd(key, normalizeDedupStatus(status) + "|" + url)) ===
|
(await this.redis.sadd(key, normalizeDedupStatus(status) + "|" + url)) ===
|
||||||
1
|
1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue