Commit Graph
2345 Commits
Author SHA1 Message Date
Alex Osborne 6b19daf1d2 ExtractorChrome: Don't capture data: URIs
They are already captured as part of their containing document. There's
no need to record them separately.

#430
2021-08-17 09:28:22 +09:00
Alex Osborne c34cb65683 ChromeClient: increase RPC timeout from 10 to 60 seconds
We hit a timeout during CI. The timeout is just a safety measure in case
the browser hangs so it doesn't hurt to have it higher. Using a higher
value will hopefully help if the system temporarily stalls for some
reason (garbage collection, IO issues, VM migration etc).
2021-08-09 14:37:45 +09:00
Andrew Jackson 0d46239c2d Update changelog following release. 2021-08-03 10:40:01 +01:00
Andrew Jackson ddb695abad [maven-release-plugin] prepare for next development iteration 2021-08-03 09:56:26 +01:00
Andrew Jackson ba44cce7f2 [maven-release-plugin] prepare release 3.4.0-20210803 3.4.0-20210803 2021-08-03 09:56:20 +01:00
Andrew Jackson 0b48699948 Update changelog 2021-08-03 09:53:30 +01:00
Alex Osborne eb67cfb215 Merge pull request #423 from internetarchive/dont-extract-data-uris
Don't extract data URIs
2021-08-03 07:43:17 +09:00
Andrew Jackson 8fe92c3437 Update changlog. 2021-08-02 13:36:45 +01:00
Andy Jackson 4d5b2dc3fe Merge pull request #397 from ukwa/upgrade-httpclient-4-5
Upgrade httpclient to 4.5
2021-08-02 09:19:30 +01:00
Alex Osborne d72d847d92 Merge pull request #421 from internetarchive/toe-thread-interrupt-fix
ToeThread: ensure currentCuri is finished before exiting
2021-07-31 16:21:14 +09:00
Alex Osborne 82b4360962 Merge pull request #418 from internetarchive/fix-keytool-on-jdk16
JDK 16 compatibility
2021-07-31 16:20:45 +09:00
Alex Osborne 33a5d70209 ExtractorSitemap: Use logUriError() helper like other extractors 2021-07-30 15:57:09 +09:00
Alex Osborne 1032c0ec40 ExtractorHTML: Avoid allocating strings for data: URIs when possible
Data URIs can be very large. ExtractorHTML mostly works with off-heap
CharSequences so by delaying the conversion of outlinks to strings
until after filtering out data URIs we can potentially avoid some
very large String allocations.
2021-07-30 15:57:09 +09:00
Alex Osborne e33e1ff398 Extractor: ignore data URIs when adding outlinks 2021-07-30 15:57:09 +09:00
Alex Osborne 91ef23eddf ExtractorPDFContext, ExtractorYoutubeDL: use addOutlink() helper method 2021-07-30 14:25:34 +09:00
Alex Osborne 466c10b7a4 Merge pull request #416 from internetarchive/extractor-chrome-replay-responses
ExtractorChrome: reduce request duplication between browser and frontier
2021-07-27 20:26:46 +09:00
Alex Osborne 721e89ca10 ToeThread: ensure currentCuri is finished before exiting
Thread interruption and certain other exceptions can cause a toe thread
to exit without informing the frontier that the current CrawlURI is
finished. This causes the job to get permanently stuck in the STOPPING
state.

This change adds a section to the finally block that will finish any
unfinished CrawlURI.

We also move the continueCheck() call after setCurrentCuri() to ensure
there's no window where InterruptedException can be thrown after the
frontier returns the next CrawlURI but before it gets assigned to
currentCuri.

Fixes #420
2021-07-26 15:26:09 +09:00
Alex Osborne f0d9385120 GitHub actions: run test suite on JDK 16 too 2021-07-25 14:11:13 +09:00
Alex Osborne f4bd5d1015 Upgrade Groovy to latest stable version (3.0.8) for JDK 16 compatibility
Fixes #419
2021-07-25 14:11:13 +09:00
Alex Osborne 636948cb09 KeyTool wrapper: fallback to running keytool as a subprocess on JDK 16+
JDK 16 defaults to --illegal-access=deny which means trying to call
KeyTool via reflection now throws IllegalAccessException.

Fixes #417
2021-07-25 11:15:45 +09:00
Alex Osborne 014fb2dcad ExtractorChrome: have frontier consider browser-fetched uris included
Since we now run extractors on subresources there's no reason to
schedule and refetch them again.

Note that duplicate fetches can still occur if the URI was already
scheduled or if the browser itself refetches the resource.
2021-07-24 17:25:21 +09:00
Alex Osborne bbae794b47 ExtractorChrome: run extractors on subresources captured by the browser
This ensures we discover links in subresources even if the browser
doesn't happen to load them. For example a CSS file might link to images
that the browser won't load as they're gated by media queries.
2021-07-24 17:16:44 +09:00
Alex Osborne 8ec7ce3363 ExtractorChrome: replay the recorded CrawlURI response to the browser
By intercepting the browser's request and fulfilling it using the
response previously recorded by FetchHTTP we avoid sending duplicate
requests for the CrawlURI to the web server.

A size limit (maxReplayLength) is applied as a safety measure since the
browser's Fetch.fulfillRequest API requires us to load the entire
response body into memory.

Note: This only applies to the main CrawlURI. The browser can still
make duplicate requests when loading sub-resources. Solving this for
sub-resources will require implementing the ability to read back
previously written WARC records.
2021-07-23 17:38:56 +09:00
Alex Osborne ab19efa9d6 Merge pull request #414 from internetarchive/maven-assembly-plugin-3.3.0
Upgrade maven-assembly-plugin to 3.3.0 to fix file permissions
2021-07-22 11:21:35 +09:00
Adam Miller d2d9d4f157 Adding configurable MaxLogFileSize option to BdbModule 2021-07-19 15:49:56 +09:00
Alex Osborne 0dfb119df2 Upgrade maven-assembly-plugin to 3.3.0 to fix file permissions
The old default version of maven-assembly-plugin generates packages
containing dangerous world writable files.

Fixes #413
2021-07-19 15:46:36 +09:00
Alex Osborne ea42630608 docs: Add decide rules to bean reference 2021-07-13 21:49:27 +09:00
Alex Osborne 09e3ff3568 Everywhere: Fix dangling JavaDoc comments
JavaDoc comments need to be directly above a class, method or field
declaration to be used by IDEs and generated documentation. We had some
doc comments that were attached to instance initialization blocks and
thus were being ignored. This invalid doc comment positioning was
presumably an accidental consequence of the conversion of fields to
KeyedProperties.

This change moves most of the dangling doc comments to setter methods
where it can be seen by tools. There were a couple of dangling doc
comments above package statements. These are moved above the class
declaration or removed entirely when empty.
2021-07-12 21:38:48 +09:00
Alex Osborne 2a027a4064 docs: Fallback to field javadoc comments when setter javadoc unavailable
This enables us to generate documentation for more bean properties,
although a number of beans have javadoc on initializer code blocks which
makes it hard to access. This affects javadoc and IDE contextual
documentation too so should probably be fixed in the source code itself.
2021-07-12 19:31:13 +09:00
Alex Osborne 812ea0f720 Merge pull request #411 from internetarchive/chrome-request-capturing
ExtractorChrome: Capture requests made by the browser
2021-07-12 17:49:31 +09:00
Alex Osborne c54f18e3ff docs: Add most of the default config beans to the bean reference
Notably Decide Rules are still to be done.
2021-07-12 11:39:06 +09:00
Alex Osborne 4dfe48b1a0 docs: Strip @link and @code javadoc directives from bean reference 2021-07-12 09:28:04 +09:00
Alex Osborne 4a5fdcfaf0 docs: Add remaining link extractor to the bean reference 2021-07-12 09:23:08 +09:00
Alex Osborne d10be35f0c docs: Remove duplicate word 'Documentation' from page titles
Also include '3' to distinguish from the Heritrix 1 manual which is
still prevalent in search results.
2021-07-12 09:10:57 +09:00
Alex Osborne 63bd15535d docs: Fix links accidentally using Markdown syntax 2021-07-12 09:09:17 +09:00
Alex Osborne b3be9d01fe docs: Start a 'Bean Reference' document generated from the source code
This is meant to complement the javadoc by providing a reference
more suitable for users trying to configure crawls rather than
developers writing new modules.

The doc generation could still do with some improving and some of the
source javadoc comments need fixing up but this is already useful so I'm
committing what I have so far.
2021-07-11 15:56:37 +09:00
Alex Osborne 3f20e736d5 docs: Fix incorrectly indented line causing rst warning 2021-07-10 21:11:03 +09:00
Alex Osborne 503e40cfce docs: Add sections on FTP, SFTP and WHOIS to config guide 2021-07-10 21:09:52 +09:00
Alex Osborne c2c2b244de docs: Add a plugin for basic auto-generation of bean examples 2021-07-10 21:09:17 +09:00
Alex Osborne 6fb699c780 docs: s/Most/More/ documentation lives on the wiki
A large amount of core documentation has now been migrated here. There's
still a lot to go but I don't think 'most' applies anymore.
2021-07-10 12:42:17 +09:00
Alex Osborne 9b1919dbd3 docs: Remove inaccurate 2018 date from documentation footer
Large portions of the docs were first published much earlier in other
places and some have been updated since then. Rather than trying to
keep a date range up to date let's just remove the date. We don't use
dates in the source code boilerplate and my understanding is copyright
notices are not mandatory in almost all countries due to the Berne
Convention anyway so it's really just informational.
2021-07-10 12:37:35 +09:00
Alex Osborne b680bb206b docs: Add subdirectory explanation from wiki install page 2021-07-10 12:13:26 +09:00
Alex Osborne a84e0bb792 docs: Add an operating guide based on the contents of the wiki 2021-07-07 21:30:36 +09:00
Alex Osborne 507d7d91a3 docs: add getting-started.rst, configuring-jobs.rst and glossary.rst
Compiled from the wiki with some restructuring, reformatting and
updating for the current version of Heritrix.
2021-07-06 22:44:11 +09:00
Andrew Jackson 0640cae4a9 Enabled AuthCache but not for DigestScheme. 2021-07-05 21:29:16 +01:00
Alex Osborne aa265855ef ExtractorChrome: Capture requests made by the browser
This adds a `captureRequests` flag to ExtractorChrome which is enabled
by default and causes requests made by the browser to be captured via
the devtools Network domain. Captured browser requests are sent to the
disposition chain for WARC writing and also to statistics tracker and
crawl log.

Browser requests are given the annotation "browser" so they can be
easily distinguished in the log from normal requests.

There are a quite a few limitations that will be addressed in followup
work:

* The frontier is entirely unaware of browser requests. This means they
  bypass quotas, ignore scope rules, politeness and don't count towards
  the statistics tracked by the frontier itself.

* There's no replay of previously saved resources so duplicate requests
  for the same URL end up being made.

* Heritrix's extractors do not currently process browser requests.

* Various error and failure cases likely need improving.
2021-07-06 00:59:26 +09:00
Alex Osborne 8bbc8261e1 Merge pull request #410 from internetarchive/warc-writer-stats-fixes
Warc writer stats fixes
2021-07-05 15:05:09 +09:00
Adam Miller ca3397e346 Fixing race condition on totalBytesWritten 2021-07-03 12:10:21 +09:00
Adam Miller 111b77b4aa Add checkpoint store/load functionality for warc writer stats 2021-07-03 12:10:21 +09:00
Alex Osborne 512acfc616 Merge pull request #403 from internetarchive/extractor-chrome
Add ExtractorChrome to contrib
2021-06-30 14:07:04 +09:00