Sign up for Apify Platform here
Star Crawlee on GitHub
Star Crawlee for Python on GitHub
Apify and Crawlee Official Forum
New post
View all posts
Related posts
Did this answer your question?
๐
๐
๐
Powered by
Hall
Inactive
Updated 4 months ago
0
Follow
save HTML file using crawlee
save HTML file using crawlee
Inactive
0
Follow
N
Nyanmaru
4 months ago
ยท
Has anybody tried downloading the HTML file of the URL using Crawlee? Was wondering if Crawlee has a capacity of downloading the HTML file of the URL since I've just been using Crawlee and really loving the experience.
E
M
N
4 comments
Share
Open in Discord
E
Exp
4 months ago
You can download HTML content of a webpages using Crawlee
M
Marco
4 months ago
It depends on which crawler you are using:
Cheerio:
https://cheerio.js.org/docs/api/classes/Cheerio#html
Playwright:
https://playwright.dev/docs/api/class-page#page-content
Puppeteer:
https://pptr.dev/api/puppeteer.page.content
N
Nyanmaru
4 months ago
Thanks for this awesome answer! Was wondering if Crawlee has examples on how to save it to a file?
M
Marco
4 months ago
You can use the KeyValueStore:
https://crawlee.dev/api/core/class/KeyValueStore
. E.g., with Cheerio:
Plain Text
Copy
await store.setValue('my-html', $.html('html'), { contentType: 'text/html' });
Add a reply
Sign up and join the conversation on Discord
Join on Discord