aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/ia.py
Commit message (Collapse)AuthorAgeFilesLines
* spn: handle blocked-url (etc) betterBryan Newbold2022-01-111-0/+10
|
* SPNv2: make 'resources' optionalBryan Newbold2021-11-161-1/+1
| | | | | | | | This was always present previously. A change was made to SPNv2 API recently that borked it a bit, though in theory should be present on new captures. I'm not seeing it for some captures, so pushing this work around. It seems like we don't actually use this field anyways, at least for ingest pipeline.
* IA (wayback): actually use an HTTP session for replay fetchesBryan Newbold2021-11-031-2/+3
| | | | | | | | I am embarassed this wasn't actually the case already! Looks like I had even instantiated a session but wasn't using it. Hopefully this change, which adds extra retries and better backoff behavior, will improve sandcrawler ingest throughput.
* make fmt (black 21.9b0)Bryan Newbold2021-10-271-257/+354
|
* fix type annotations for petabox body fetch helperBryan Newbold2021-10-261-1/+1
|
* lint collection membership (last lint for now)Bryan Newbold2021-10-261-7/+7
|
* more progress on type annotations and lintingBryan Newbold2021-10-261-2/+2
|
* ia: more tweaks to delicate code to satisfy type checkerBryan Newbold2021-10-261-10/+12
| | | | | Ran the 'live' wayback tests after this commit as a check, and worked (once FTP status code behavior change is fixed)
* ia helpers: enforce max_redirects count correctlyBryan Newbold2021-10-261-1/+1
| | | | | AKA, should run fetch even if max_redirects = 0; the first loop iteration is not a redirect.
* set CDX request params are str, not int or datetimeBryan Newbold2021-10-261-3/+6
| | | | This might be a bugfix, changing CDX lookup behavior?
* bugfix: was setting 'from' parameter as a tuple, not a stringBryan Newbold2021-10-261-1/+1
|
* start type annotating IA helper codeBryan Newbold2021-10-261-37/+65
|
* flake8 clean (with current settings)Bryan Newbold2021-10-261-2/+2
|
* start handling trivial lint cleanups: unused imports, 'is None', etcBryan Newbold2021-10-261-15/+14
|
* make fmtBryan Newbold2021-10-261-68/+124
|
* python: isort all importsBryan Newbold2021-10-261-10/+12
|
* move SPNv2 'simple_get' logic to SPN clientBryan Newbold2021-10-151-2/+29
|
* spn: avoid 'None' job_idBryan Newbold2021-10-111-2/+2
| | | | | | Thanks Vanglis for reporting these. Not sure this commit fixes *all* instances of the problem.
* ingest CDX lookup: weigh year+month of capture against in-petabox-or-notBryan Newbold2021-09-301-0/+1
| | | | | | | | This is to try working around an issue where ingests fail because an SPN capture is much newer, but the old sorting preference ignored that. Note that the sorting logic is pretty busted anyways, and we should probably allow returning multiple matching files to try.
* tune SPN CDX retry/wait depending on mode (priority vs daily)Bryan Newbold2021-09-301-2/+4
|
* crawl: SPN2 non-200 success code pathBryan Newbold2021-07-131-11/+25
|
* crawl: SPN self-redirect hackBryan Newbold2021-07-131-0/+9
|
* crawl: small comment updatesBryan Newbold2021-07-131-3/+6
|
* ia CDX: handle bad CDX rowsBryan Newbold2021-01-051-2/+4
|
* spn: more status codesBryan Newbold2020-12-211-1/+2
|
* handle more wayback error conditionsBryan Newbold2020-11-201-0/+6
|
* spn 'forbidden' status codeBryan Newbold2020-11-121-1/+1
|
* spn2-internal-server-error is a problem with remote server, not SPN2Bryan Newbold2020-11-081-0/+2
|
* ingest: better non-full URL fixupBryan Newbold2020-11-081-4/+3
|
* direct some more warnings to sys.stderr, not stdoutBryan Newbold2020-11-081-2/+2
|
* html: handle no-capture for sub-resourcesBryan Newbold2020-11-081-0/+3
|
* ingest: fix null-body caseBryan Newbold2020-11-081-0/+2
| | | | Broke this in earlier refactor.
* ia: use newer gwb (petabox) loading classBryan Newbold2020-11-041-5/+8
| | | | This fixes zstandard WARC reading.
* move transfer encoding helper to sandcrawler/ia.pyBryan Newbold2020-11-031-1/+26
|
* ingest: tweak debug printing alignmentBryan Newbold2020-11-031-8/+7
|
* cdx: fix 'closest' supportBryan Newbold2020-11-031-3/+2
|
* cdx: add support for 'closest' time parameterBryan Newbold2020-10-301-3/+9
|
* ingest: decrease CDX timeout retries againBryan Newbold2020-10-221-1/+1
|
* differential wayback-error from wayback-content-errorBryan Newbold2020-10-211-10/+13
| | | | | | The motivation here is to distinguish errors due to current content in wayback (eg, in WARCs) from operational errors (eg, wayback machine is down, or network failures/disruption).
* SPN CDX delay now seems reasonable; increase to 40sec to catch mostBryan Newbold2020-10-191-1/+1
|
* CDX: when retrying, do so every 3 seconds up to limitBryan Newbold2020-10-191-5/+9
|
* SPN: more verbose status loggingBryan Newbold2020-10-191-0/+4
|
* CDX: revert post-SPN CDX lookup retry to 10 secondsBryan Newbold2020-10-191-1/+1
| | | | | Hoping to have many fewer SPN requests and issues, so willing to wait longer for each.
* ingest: catch wayback-fail-after-SPN as separate statusBryan Newbold2020-10-191-4/+17
|
* SPN: better log line when starting a requestBryan Newbold2020-10-191-0/+1
|
* SPN: look for non-200 CDX responsesBryan Newbold2020-10-191-1/+1
| | | | Suspect that this has been the source of many `spn2-cdx-lookup-failure`
* SPN: better check for partial URLs returnedBryan Newbold2020-10-191-2/+2
|
* CDX fetch: more permissive fuzzy/normalization checkBryan Newbold2020-10-191-3/+9
| | | | | | | This might the source of some `spn2-cdx-lookup-failure`. Wayback/CDX does this check via full-on SURT, with many more changes, and potentially we should be doing that here as well.
* ingest: experimentally reduce CDX API retry delayBryan Newbold2020-10-171-1/+1
| | | | | | | This code path is only working about 1/7 times in production. Going to try with a much shorter retry delay and see if we get no success with that. Considering also just disabling this attempt all together and relying on retries after hours/days.
* ingest: handle cookieAbsent and partial SPNv2 URL reponse cases betterBryan Newbold2020-10-171-0/+31
|