Compare commits

...
7 Commits
Author SHA1 Message Date
Nick Sweeting 3830544e13 Update Docker runtime dependencies 2026-05-18 02:24:38 -07:00
Nick Sweeting 913542c19f Release v0.7.4 2026-05-18 02:00:33 -07:00
Nick Sweeting f603a0dfff fix: skip URL entries in save_text_as_source to prevent Path() errors (#1787)
## Fix for Issue #1000

When using `archivebox add --parser=wallabag_atom <feed_url>`, the raw
feed URL was being processed by `save_text_as_source()` which splits on
whitespace and passes each token to `Path()`. URLs get broken and
treated as local file paths, causing spurious "No such file" errors and
random file paths to be accessed.

### Root Cause
Commit a676767 added file-referencing logic to `save_text_as_source()`.
URLs in the raw text (like wallabag feed URLs) get split into fragments
that `Path()` then tries to read as local files.

### Fix
Skip entries that look like URLs (`http://`, `https://`, `ftp://`)
before calling `Path().exists()`.

### Testing
Run: `curl <wallabag_feed_url> | archivebox add --parser=wallabag_atom`

Fixes #1000


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Skip URL tokens (`http://`, `https://`, `ftp://`) in
`save_text_as_source()` to avoid passing them to `Path()`, preventing
"No such file" errors when adding Wallabag Atom feeds. Fixes #1000.

<sup>Written for commit 5e47e055a2.
Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2026-04-17 10:11:22 -07:00
zkksdk 5e47e055a2 fix: skip URL entries in save_text_as_source to prevent Path() errors
When raw_text contains URLs (e.g. from wallabag_atom parser), split()
breaks them into fragments that Path() tries to read as local files.
This causes spurious "No such file" errors and random paths to be
accessed. Skip entries that look like URLs before checking Path.exists().

Fixes #1000
2026-04-18 00:25:10 +08:00
Nick Sweeting d1136d74cb fix docker release script 2024-12-15 02:06:49 -08:00
Nick Sweeting 54f598789e bump more js and py dependency lockfiles 2024-12-15 00:33:03 -08:00
Nick Sweeting 5171eaf31e bump dependencies and metadata for 0.7.3 2024-12-15 00:25:35 -08:00
12 changed files with 418 additions and 2474 deletions

No files matched your search

+19 -6
View File
@@ -45,7 +45,10 @@ ENV TZ=UTC \
# Version config
ENV PYTHON_VERSION=3.11 \
NODE_VERSION=20
NODE_VERSION=24 \
PLAYWRIGHT_VERSION=1.59.0 \
YTDLP_VERSION=2026.3.17 \
GOSU_VERSION=1.19
# User config
ENV ARCHIVEBOX_USER="archivebox" \
@@ -113,10 +116,20 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
# 1. packaging dependencies
apt-transport-https ca-certificates apt-utils gnupg2 curl wget \
# 2. docker and init system dependencies
zlib1g-dev dumb-init gosu cron unzip grep \
zlib1g-dev dumb-init cron unzip grep \
# 3. frivolous CLI helpers to make debugging failed archiving easier
# nano iputils-ping dnsutils htop procps jq yq
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& case "$TARGETARCH/$TARGETVARIANT" in \
amd64/) GOSU_ARCH=amd64; GOSU_SHA256=52c8749d0142edd234e9d6bd5237dff2d81e71f43537e2f4f66f75dd4b243dd0 ;; \
arm64/) GOSU_ARCH=arm64; GOSU_SHA256=3a8ef022d82c0bc4a98bcb144e77da714c25fcfa64dccc57f6aba7ae47ff1a44 ;; \
arm/v7) GOSU_ARCH=armhf; GOSU_SHA256=8457a0bfd28e016c2c7d8ea6e5f7eed1376033ffbd36491bb455094c8b1dc9fd ;; \
*) echo "Unsupported gosu platform: $TARGETARCH/$TARGETVARIANT"; exit 1 ;; \
esac \
&& curl -fsSL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$GOSU_ARCH" \
&& echo "$GOSU_SHA256 /usr/local/bin/gosu" | sha256sum -c - \
&& chmod +x /usr/local/bin/gosu \
&& gosu --version | head -n1 | tee -a /VERSION.txt
######### Language Environments ####################################
@@ -164,7 +177,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
echo "[+] Installing APT extractor dependencies globally using apt..." \
&& apt-get update -qq \
&& apt-get install -qq -y -t bookworm-backports --no-install-recommends \
curl wget git yt-dlp ffmpeg ripgrep \
curl wget git ffmpeg ripgrep \
# Packages we have also needed in the past:
# youtube-dl wget2 aria2 python3-pyxattr rtmpdump libfribidi-bin mpv \
# fontconfig fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-symbola fonts-noto fonts-freefont-ttf \
@@ -173,7 +186,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
&& ( \
which curl && curl --version | head -n1 \
&& which wget && wget --version 2>&1 | head -n1 \
&& which yt-dlp && yt-dlp --version 2>&1 | head -n1 \
&& which git && git --version 2>&1 | head -n1 \
&& which rg && rg --version 2>&1 | head -n1 \
&& echo -e '\n\n' \
@@ -185,7 +197,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
&& apt-get update -qq \
&& if [[ "$TARGETPLATFORM" == *amd64* || "$TARGETPLATFORM" == *arm64* ]]; then \
# install Chromium using playwright
pip install playwright \
pip install "playwright==$PLAYWRIGHT_VERSION" \
&& cp -r /root/.cache/ms-playwright "$PLAYWRIGHT_BROWSERS_PATH" \
&& playwright install --with-deps chromium \
&& export CHROME_BINARY="$(python -c 'from playwright.sync_api import sync_playwright; print(sync_playwright().start().chromium.executable_path)')"; \
@@ -238,6 +250,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
# && pdm export -o requirements.txt --without-hashes \
# && source $GLOBAL_VENV/bin/activate \
&& pip install -r requirements.txt \
&& pip install --upgrade "yt-dlp==$YTDLP_VERSION" \
&& apt-get purge -y \
build-essential \
&& apt-get autoremove -y \
+4 -1
View File
@@ -836,7 +836,10 @@ def bin_version(binary: Optional[str]) -> Optional[str]:
if not version_str:
version_str = run([abspath, "--version"], stdout=PIPE).stdout.strip().decode()
# take first 3 columns of first line of version info
return ' '.join(version_str.split('\n')[0].strip().split()[:3])
version_parts = version_str.split('\n')[0].strip().split()
if version_parts[:4] == ['Google', 'Chrome', 'for', 'Testing']:
return ' '.join(version_parts[:5])
return ' '.join(version_parts[:3])
except OSError:
pass
# stderr(f'[X] Unable to find working version of dependency: {binary}', color='red')
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "archivebox",
"version": "0.7.2",
"version": "0.7.4",
"description": "ArchiveBox: The self-hosted internet archive",
"author": "Nick Sweeting <archivebox-npm@sweeting.me>",
"repository": "github:ArchiveBox/ArchiveBox",
@@ -8,6 +8,6 @@
"dependencies": {
"@postlight/parser": "^2.2.3",
"readability-extractor": "github:ArchiveBox/readability-extractor",
"single-file-cli": "^1.1.46"
"single-file-cli": "^2.0.83"
}
}
+3
View File
@@ -155,6 +155,9 @@ def save_text_as_source(raw_text: str, filename: str='{ts}-stdin.txt', out_dir:
referenced_texts = ''
for entry in raw_text.split():
# Skip URLs - Path() can't handle them and they aren't local files
if any(entry.startswith(s) for s in ('http://', 'https://', 'ftp://')):
continue
try:
if Path(entry).exists():
referenced_texts += Path(entry).read_text()
+5 -2
View File
@@ -73,7 +73,7 @@ check_platforms || (recreate_builder && check_platforms) || exit 1
# Build python package lists
echo "[+] Generating requirements.txt and pdm.lock from pyproject.toml..."
pdm lock --group=':all' --strategy="cross_platform" --production
pdm lock --group=':all' --strategy="inherit_metadata" --production
pdm export --group=':all' --production --without-hashes -o requirements.txt
@@ -88,14 +88,17 @@ docker buildx build --platform "$SELECTED_PLATFORMS" --load . \
-t archivebox/archivebox:$SHORT_VERSION \
-t archivebox/archivebox:$GIT_SHA \
-t archivebox/archivebox:latest \
-t archivebox/archivebox:stable \
-t nikisweeting/archivebox \
-t nikisweeting/archivebox:$TAG_NAME \
-t nikisweeting/archivebox:$VERSION \
-t nikisweeting/archivebox:$SHORT_VERSION \
-t nikisweeting/archivebox:$GIT_SHA \
-t nikisweeting/archivebox:latest \
-t nikisweeting/archivebox:stable \
-t ghcr.io/archivebox/archivebox/archivebox:$TAG_NAME \
-t ghcr.io/archivebox/archivebox/archivebox:$VERSION \
-t ghcr.io/archivebox/archivebox/archivebox:$SHORT_VERSION \
-t ghcr.io/archivebox/archivebox/archivebox:$GIT_SHA \
-t ghcr.io/archivebox/archivebox/archivebox:latest
-t ghcr.io/archivebox/archivebox/archivebox:latest \
-t ghcr.io/archivebox/archivebox/archivebox:stable
+7 -3
View File
@@ -26,8 +26,8 @@ SELECTED_PLATFORMS="${2:-$SUPPORTED_PLATFORMS}"
# docker login --username=nikisweeting
# docker login ghcr.io --username=pirate
echo "[^] Building docker image"
./bin/build_docker.sh "$TAG_NAME" "$SELECTED_PLATFORMS"
# echo "[^] Building docker image"
# ./bin/build_docker.sh "$TAG_NAME" "$SELECTED_PLATFORMS"
echo "[^] Uploading docker image"
docker buildx build --platform "$SELECTED_PLATFORMS" --push . \
@@ -37,14 +37,18 @@ docker buildx build --platform "$SELECTED_PLATFORMS" --push . \
-t archivebox/archivebox:$SHORT_VERSION \
-t archivebox/archivebox:$GIT_SHA \
-t archivebox/archivebox:latest \
-t archivebox/archivebox:stable \
-t nikisweeting/archivebox \
-t nikisweeting/archivebox:$TAG_NAME \
-t nikisweeting/archivebox:$VERSION \
-t nikisweeting/archivebox:$SHORT_VERSION \
-t nikisweeting/archivebox:$GIT_SHA \
-t nikisweeting/archivebox:latest \
-t nikisweeting/archivebox:stable \
-t ghcr.io/archivebox/archivebox/archivebox:$TAG_NAME \
-t ghcr.io/archivebox/archivebox/archivebox:$VERSION \
-t ghcr.io/archivebox/archivebox/archivebox:$SHORT_VERSION \
-t ghcr.io/archivebox/archivebox/archivebox:$GIT_SHA
-t ghcr.io/archivebox/archivebox/archivebox:$GIT_SHA \
-t ghcr.io/archivebox/archivebox/archivebox:latest \
-t ghcr.io/archivebox/archivebox/archivebox:stable
+6 -11
View File
@@ -8,12 +8,10 @@
# Documentation:
# https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
version: '3.9'
services:
archivebox:
#image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
image: archivebox/archivebox:dev
image: archivebox/archivebox:stable
command: server --quick-init 0.0.0.0:8000
ports:
- 8000:8000
@@ -41,7 +39,7 @@ services:
# ...
# add further configuration options from archivebox/config.py as needed (to apply them only to this container)
# or set using `docker compose run archivebox config --set SOME_KEY=someval` (to persist config across all containers)
# For ad-blocking during archiving, uncomment this section and pihole service section below
# networks:
# - dns
@@ -51,13 +49,10 @@ services:
######## Optional Addons: tweak examples below as needed for your specific use case ########
### Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
# $ curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg
# After starting, backfill any existing Snapshots into the full-text index:
# $ docker-compose run archivebox update --index-only
### Example: To run the Sonic full-text search backend, uncomment this block and the sonic config above
# sonic:
# image: valeriansaliou/sonic:latest
# image: archivebox/sonic:latest
# expose:
# - 1491
# environment:
@@ -65,8 +60,8 @@ services:
# volumes:
# - ./sonic.cfg:/etc/sonic.cfg:ro
# - ./data/sonic:/var/lib/sonic/store
### Example: To run pihole in order to block ad/tracker requests during archiving,
# uncomment this block and set up pihole using its admin interface
+32 -1060
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "archivebox",
"version": "0.7.2",
"version": "0.7.4",
"description": "ArchiveBox: The self-hosted internet archive",
"author": "Nick Sweeting <archivebox-npm@sweeting.me>",
"repository": "github:ArchiveBox/ArchiveBox",
@@ -8,6 +8,6 @@
"dependencies": {
"@postlight/parser": "^2.2.3",
"readability-extractor": "github:ArchiveBox/readability-extractor",
"single-file-cli": "^1.1.46"
"single-file-cli": "^2.0.83"
}
}
Generated
+294 -1335
View File
File diff suppressed because it is too large. Load diff
+9 -10
View File
@@ -1,21 +1,21 @@
[project]
name = "archivebox"
version = "0.7.2"
version = "0.7.4"
description = "Self-hosted internet archiving solution."
authors = [
{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"},
]
dependencies = [
"croniter>=0.3.34",
"dateparser>=1.0.0",
"croniter>=6.2.2",
"dateparser>=1.2.2",
"django-extensions>=3.0.3",
"django>=3.1.3,<3.2",
"ipython>5.0.0",
"mypy-extensions>=0.4.3",
"python-crontab>=2.5.1",
"requests>=2.24.0",
"w3lib>=1.22.0",
"yt-dlp>=2023.10.13",
"mypy-extensions>=1.1.0",
"python-crontab>=3.3.0",
"requests>=2.32.5",
"w3lib>=2.3.1",
"yt-dlp>=2025.10.14",
# "playwright>=1.39.0; platform_machine != 'armv7l'",
]
requires-python = ">=3.9,<3.12"
@@ -92,7 +92,7 @@ sonic = [
]
ldap = [
# apt install libldap2-dev libsasl2-dev
"python-ldap>=3.4.3",
"python-ldap>=3.4.6",
"django-auth-ldap>=4.1.0",
]
# playwright = [
@@ -119,4 +119,3 @@ Community = "https://github.com/ArchiveBox/ArchiveBox/wiki/Web-Archiving-Communi
Demo = "https://demo.archivebox.io"
Donate = "https://github.com/ArchiveBox/ArchiveBox/wiki/Donations"
+35 -42
View File
@@ -1,54 +1,47 @@
# This file is @generated by PDM.
# Please do not edit it manually.
asgiref==3.7.2
asttokens==2.4.1
brotli==1.1.0; implementation_name == "cpython"
brotlicffi==1.1.0.0; implementation_name != "cpython"
certifi==2023.11.17
cffi==1.16.0; implementation_name != "cpython"
charset-normalizer==3.3.2
asgiref==3.11.1
asttokens==3.0.1
certifi==2026.4.22
charset-normalizer==3.4.7
colorama==0.4.6; sys_platform == "win32"
croniter==2.0.1
dateparser==1.2.0
decorator==5.1.1
croniter==6.2.2
dateparser==1.2.2
decorator==5.3.1
django==3.1.14
django-auth-ldap==4.1.0
django-extensions==3.1.5
exceptiongroup==1.2.0; python_version < "3.11"
executing==2.0.1
idna==3.6
exceptiongroup==1.3.1; python_version < "3.11"
executing==2.2.1
idna==3.15
ipython==8.18.1
jedi==0.19.1
matplotlib-inline==0.1.6
mutagen==1.47.0
mypy-extensions==1.0.0
parso==0.8.3
jedi==0.19.2
matplotlib-inline==0.2.2
mypy-extensions==1.1.0
parso==0.8.7
pexpect==4.9.0; sys_platform != "win32"
prompt-toolkit==3.0.43
prompt-toolkit==3.0.52
ptyprocess==0.7.0; sys_platform != "win32"
pure-eval==0.2.2
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21; implementation_name != "cpython"
pycryptodomex==3.19.1
pygments==2.17.2
python-crontab==3.0.0
python-dateutil==2.8.2
python-ldap==3.4.4
pytz==2023.3.post1
regex==2023.12.25
requests==2.31.0
six==1.16.0
pure-eval==0.2.3
pyasn1==0.6.3
pyasn1-modules==0.4.2
pygments==2.20.0
python-crontab==3.3.0
python-dateutil==2.9.0.post0
python-ldap==3.4.6
pytz==2026.2
regex==2026.1.15
requests==2.32.5
six==1.17.0
sonic-client==1.0.0
sqlparse==0.4.4
sqlparse==0.5.5
stack-data==0.6.3
traitlets==5.14.1
typing-extensions==4.9.0; python_version < "3.11"
tzdata==2023.4; platform_system == "Windows"
tzlocal==5.2
urllib3==2.1.0
w3lib==2.1.2
wcwidth==0.2.12
websockets==12.0
yt-dlp==2023.12.30
traitlets==5.15.0
typing-extensions==4.15.0; python_version < "3.11"
tzdata==2026.2; platform_system == "Windows"
tzlocal==5.3.1
urllib3==2.6.3
w3lib==2.3.1
wcwidth==0.7.0
yt-dlp==2025.10.14