this post was submitted on 12 Aug 2026
10 points (100.0% liked)

Web Development

5787 readers
4 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS
 

So, what I want is to download lemmy posts (including comments) as raw html through a script. The problem I have is, that curl by default does not include the css of the page. Is there a way I can download the posts webpages as they are being displayed?

you are viewing a single comment's thread
view the rest of the comments
[–] DmMacniel@feddit.org 1 points 1 week ago (1 children)

Mhm you could run a script through the HTML and look for stylesheet hrefs and download next to them.

[–] cows_are_underrated@feddit.org 2 points 1 week ago (1 children)

I was more looking at doing this with a tool like wget. I got the following command, that downloads the post and its assets, but for some reason it then does not actually work:

'wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains "feddit.org" --no-parent "feddit.org/post" "https://feddit.org/post/33942692"'

The advantage of wget is, that it also accepts multiple links at once, so it is quite easy do download multiple posts at once (which is my goal)

[–] apparia@discuss.tchncs.de 2 points 1 week ago (1 children)

If this is what you are seeing that makes it "not work":

It seems to be implemented in a script that runs when the saved page loads and hides the content, even though that content is actually there. You can tell wget to ignore scripts (which aren't very useful in a download anyway, as they mostly pertain to interactivity) with --reject js. I tried this and was able to view the downloaded post properly.

I've no idea why the script does that, one could probably look at the lemmy-ui source code to figure it out.

That was my exact problem. Thanks for the solution.