Commit Graph

42 Commits

Author SHA1 Message Date
Ed Summers
20ca50dc90 Clean up browsertrix-crawler files
Remove any local browsertrix-crawler files after the WACZ has been
copied to storage. Note, until this issue has a release on DockerHub the
local files won't be able to be deleted since Docker on Linux creates
the files as root:

https://github.com/webrecorder/browsertrix-crawler/issues/170

The code will catch this exception and log a warning instead of failing
and losing the work that has been completed.
2022-10-11 16:49:19 -04:00
Ed Summers
c34fb9cf10 Add browsertrix profile config option
This commit adds a browsertrix profile option to the configuration. In
order to not require the passing of the browsertrix config to every
Archiver, the Archiver constructors (include the base) were modified to
accept a Storage and Config instance. Some of the constructors them pick
out the pieces they need from the Config, in addition to calling the
parent constructor. In order to avoid a circular import that this
created the Config object now defines the default hash function to use,
rather than having it be a static property of the Archiver class.
2022-10-11 16:21:42 -04:00
Ed Summers
3b87dffe6b Add browsertrix-crawler capture
The [browsertrix-crawler] utility is a browser-based crawler that can
crawl one or more pages. browsertrix-crawler creates archives in the
[WACZ] format which is essentially a standardized ZIP file (similar to DOCX, EPUB, JAR, etc) which can then be replayed using the [ReplayWeb.page] web
component, or unzipped to get the original WARC data (the ISO standard
format used by the Internet Archive Wayback Machine).

This PR adds browsertrix-crawler to archiver classes where screenshots are made made. The WACZ is uploaded to storage and then added to a new column in the spreadsheet. A column can be added that will display the WACZ, loaded from cloud storage (S3, digitalocean, etc) using the client side ReplayWeb page. You can see an example of the spreadsheet here:

https://docs.google.com/spreadsheets/d/1Tk-iJWzT9Sx2-YccuPttL9HcMdZEnhv_OR7Bc6tfeu8/edit#gid=0

browsertrix-crawler requires Docker to be installed. If Docker is not
installed an error message will be logged and things continue as normal.

[browsertrix-crawler]: https://github.com/webrecorder/browsertrix-crawler
[WACZ]: https://specs.webrecorder.net/wacz/latest/
[ReplayWeb.page]: https://replayweb.page
2022-09-25 19:46:29 +00:00
msramalho
9317b5e035 turning HASH_ALGORITHM into global archiver prop 2022-07-25 12:27:50 +01:00
msramalho
2d7d8c4e08 renaming and making default SHA-256 2022-07-25 12:12:43 +01:00
Dave Mateer
363a8ef67a Added hash_algorithm to config to choose between SHA256 and SHA3_512 2022-07-18 13:15:48 +01:00
msramalho
4b423dfc34 fix telethon exception 2022-06-27 14:36:58 +02:00
msramalho
ffe1c425a0 new archiver, new hack, ready 2022-06-27 01:07:55 +02:00
msramalho
b4e9d6a2a8 removes log 2022-06-21 15:39:54 +02:00
msramalho
c4efa6e597 dding thumbnails 2022-06-21 15:39:13 +02:00
msramalho
177e3a623e improve log 2022-06-16 20:04:43 +02:00
msramalho
cdd66fb7da returning empty string thumbs 2022-06-16 16:30:08 +02:00
msramalho
c08b5268f7 using API instead of scraping 2022-06-15 21:25:15 +02:00
msramalho
2dbdf9b8d3 check if exists 2022-06-15 17:04:50 +02:00
msramalho
771c5376c4 simplify display 2022-06-15 16:47:20 +02:00
msramalho
951b16ba9c improving media page with images and videos 2022-06-15 16:38:30 +02:00
msramalho
12648bbce9 centralizing slugify url method 2022-06-14 20:15:14 +02:00
msramalho
6499161f5c fixing gd bug on twitter images 2022-06-14 19:55:05 +02:00
msramalho
bd5146ac3e bug fixes 2022-06-08 18:17:25 +02:00
msramalho
067e6d8954 retry mechanism 2022-06-08 13:39:52 +02:00
msramalho
13e7d0bf1b improving path operations 2022-06-08 11:11:09 +02:00
msramalho
f87acb6d1d refactor 2022-06-07 18:41:58 +02:00
msramalho
e2d1a5d6be import cleanups 2022-06-03 18:30:12 +02:00
msramalho
66e214afa4 minor improvements and cleanup archivers 2022-06-03 18:23:45 +02:00
msramalho
10f03cb888 Merge branch 'dev' into refactor-configs 2022-06-02 17:30:47 +02:00
msramalho
159adf9afe refactoring filenumber into subfolder 2022-05-26 19:18:29 +02:00
Dave Mateer
dbac5accbd Save to folders for S3 and GD. Google Drive (GD) storage 2022-05-11 15:39:44 +01:00
msramalho
6bd6f88b46 refactor 2022-05-09 17:45:54 +02:00
msramalho
0d65798308 wip: configurations and logic 2022-05-09 14:54:48 +02:00
msramalho
e5168fa07c removing TODO 2022-03-30 10:55:57 +02:00
msramalho
576f1a8f68 fix the UTF-8 issue for cyrilic 2022-03-30 10:55:33 +02:00
Logan Williams
398f296789 Fix Selenium driver issues with telegram links 2022-03-18 11:10:27 +01:00
msramalho
c2ae382a4e isloates html page generation logic so it can be reused 2022-03-16 19:50:44 +01:00
msramalho
3b9b42b854 minor code cleanup 2022-03-15 11:32:39 +01:00
Logan Williams
2d50703489 Generate archivers for Telegram posts with images; move generation to function in base_archiver 2022-02-28 08:41:45 +01:00
Logan Williams
63a2847ac9 Add header argument; set up webdriver 2022-02-25 16:09:35 +01:00
Logan Williams
1eb17e4de5 Add hash and screenshot methods; switch to more recent ytdl fork 2022-02-25 13:54:40 +01:00
msramalho
214d52d36f improved tmp folder management 2022-02-23 16:43:42 +01:00
msramalho
3cafc444fc creates tmp folder if not exists 2022-02-23 16:32:38 +01:00
msramalho
9a264a7dfe cleanup and docs 2022-02-23 16:07:58 +01:00
msramalho
e4603a9423 refactoring storage and bringing changes from origin 2022-02-22 16:03:35 +01:00
msramalho
f3ce226665 split into multiple files MVP 2022-02-21 14:19:09 +01:00