download markdown .md instead of json?

is there an easy way to download all pages as markdown instead of json or manually copying?
2 Replies
Kaleb
Kaleb16mo ago
We extract the markdown and save it to a .md file like this
# Crawl the URL using FirecrawlApp
crawl_results = app.crawl_url(url, crawler_params)

for index, result in enumerate(crawl_results):
# Check if markdown content is present and write it to the file
if "markdown" in result:
# Using index to create a unique filename for every result
output_path = f"output_{index + 1}.md"
with open(output_path, "w") as file:
file.write(result["markdown"])
# Crawl the URL using FirecrawlApp
crawl_results = app.crawl_url(url, crawler_params)

for index, result in enumerate(crawl_results):
# Check if markdown content is present and write it to the file
if "markdown" in result:
# Using index to create a unique filename for every result
output_path = f"output_{index + 1}.md"
with open(output_path, "w") as file:
file.write(result["markdown"])
sleepingsheep
sleepingsheepOP16mo ago
thank you!

Did you find this page helpful?