Re: new auth errors at ao3 with lynx.
Thorsten Glaser <[email protected]> Sun, 30 Nov 2025 14:14:01 +0000 (UTC)
| Newsgroups | gmane.comp.web.lynx.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Karen, I’m getting them as well. I think AO3 did something that now requires Javascript, as it works in Firefox. To log in, I now log in in Firefox, exit Firefox, and then use a small script (included below) to extract the cookies and copy them to lynx’ cookie jar. You’ll likely need help from someone experienced with the Unix commandline for that. Doing kudos, commenting, etc. is not possible with lynx at the moment, but I’m mostly glad I can still read. If everything else fails, https://fichub.net/ can still download AO3 stories, as it does for FFN stories. . The script itself (ffgetcookies) is included as an attachment. It needs mksh and sqlite3 installed, and one needs to either have only one Firefox profile or call it with the name of the right cookies.sqlite file to dump. The output is in lynx (Netscape) cookie jar format, and one needs to grep for archiveofourown and copy the corresponding lines into the lynx cookie jar while lynx is not running(!). Careful when copying, the format uses both tabs and spaces, so make sure to not change the tabs to spaces accidentally, or it won’t work. Good luck, //mirabilos -- „Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund, mksh auf jedem System zu installieren.“ -- XTaran auf der OpenRheinRuhr, ganz begeistert (EN: “[…]uhr.gz is a reason to install mksh on every system.”)
ffgetcookies
(text/plain, 2 KB)
#!/bin/mksh
# © mirabilos Ⓕ MirBSD or CC0
# determine path to cookies.sqlite file
db=
if [[ -z $1 ]]; then
# profile, if there is only a single one
for x in ~/.mozilla/firefox/*/cookies.sqlite; do
[[ -e $x ]] || continue
if [[ -n $db ]]; then
print -ru2 "E: ambiguous databases"
for x in ~/.mozilla/firefox/*/cookies.sqlite; do
print -ru2 "N: ${x@Q}"
done
exit 1
fi
db=$x
done
elif [[ -e $1 ]]; then
# filename, direct
db=$1
elif [[ -e ~/.mozilla/firefox/$1/cookies.sqlite ]]; then
# fully qualified profile name
db=~/.mozilla/firefox/$1/cookies.sqlite
elif [[ $1 != */* ]]; then
# human-readable profile name or profile identifier
for x in ~/.mozilla/firefox/{$1.*,*.$1}/cookies.sqlite; do
[[ -e $x ]] || continue
if [[ -n $db ]]; then
print -ru2 "E: ambiguous databases"
for x in ~/.mozilla/firefox/{$1.*,*.$1}/cookies.sqlite; do
[[ ! -e $x ]] || print -ru2 "N: ${x@Q}"
done
exit 1
fi
db=$x
done
fi
# realpathise as sqlite3(1) has no support for --
[[ -z $db || ! -e $db || ! -f $db || ! -s $db || ! -r $db ]] || \
db=$(\\builtin realpath -- "$db") || exit 1
# arriving at plausible pathname, with OS/2 support?
if [[ $db != ?([A-Z]:)/* || ! -e $db || ! -f $db || ! -s $db || ! -r $db ]]; then
[[ -n $db ]] || db=$1
print -ru2 "E: no database: ${db@Q}"
exit 1
fi
# run query
exec sqlite3 -bail -batch -init /dev/null -noheader \
-list -nullvalue '\N' -readonly -separator $'\t' "$db" <<\EOF
SELECT IIF(SUBSTR(host, 1, 1) = '.', SUBSTR(host, 2), host),
IIF(SUBSTR(host, 1, 1) = '.', 'TRUE', 'FALSE'),
path,
IIF(isSecure > 0, 'TRUE', 'FALSE'),
expiry, name, value
FROM moz_cookies
WHERE host IS NOT NULL AND host != ''
AND path IS NOT NULL AND path != ''
AND expiry IS NOT NULL
AND name IS NOT NULL AND name != ''
AND value IS NOT NULL AND value != ''
ORDER BY IIF(SUBSTR(host, 1, 1) = '.', SUBSTR(host, 2), host),
path, name;
EOF