Does anyone have a copy of the SL4 archives in a format that's easier to read - e.g. a single file?

If not, I'd be happy to pay someone to put this together; let me know if interested.

New to LessWrong?

New Answer
New Comment

2 Answers sorted by

Zack_M_Davis

Aug 12, 2021

100

How much are you offering? I downloaded by the by-date archive page and wrote this Python code to download the individual message pages, with the thought of catting them together to get your "single file." (Which is an ugly hack and not even technically valid HTML, but it worked when I've done it in the past.) But it's only halfway through downloading and I need to turn the computer and its noisy fan off and go to sleep now; this should be easy to finish tomorrow.

import re
import requests

# http://sl4.org/archive/date.html
with open("sl4_archive_date.html", 'rb') as toc:
    archive_page = str(toc.read())
    results = re.findall(r"http://sl4.org/archive/\d+/\d+.html", archive_page)

for i, result in enumerate(results):
    message = requests.get(result)
    with open("messages/{:07}.html".format(i), 'w') as f:
        f.write(str(message.content))

Ugh, maybe this wasn't such a good strategy. After downloading all the message pages and catting them in a loop, I did "successfully" end up with a 128 MiB HTML file ...

full_sl4_archive.html

But, first of all, it somehow ended up with a lot of escape characters (\n, \') displayed literally in the page. (Not sure how that happe—oh. The str(message.content) in my script should have been a message.content.decode().) Second of all, this enormous file is not actually smooth to read on my machine (it just crashes in Firefox, and Chromium is very laggy). On net, t... (read more)

PeterMcCluskey

Aug 12, 2021

50

I suggest looking at hypetombox.pl, which should convert the archive into a Unix mbox file. You probably want to use wget first.

I'd specifically suggest using something like

wget --mirror -np http://sl4.org/archive/date.html

to download everything into a local directory structure.  After that you can experiment with how to format the resulting stuff.