Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions notebooks/Firecrawl_Scraping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -508,23 +508,22 @@
"for _, scraped_content in url_response.items():\n",
" csv_data = scraped_content.get(\"csv_data\")\n",
" scraped_results = scraped_content.get(\"scraped_data\")\n",
"\n",
" for scraped_site_dict in scraped_results:\n",
" for result in scraped_results:\n",
" markdown_content = result.get(\"markdown\")\n",
" title = result.get(\"metadata\").get(\"title\")\n",
" url = result.get(\"metadata\").get(\"sourceURL\")\n",
" documents.append(\n",
" Document(\n",
" text=markdown_content,\n",
" metadata={\n",
" \"title\": title,\n",
" \"url\": url,\n",
" \"description\": csv_data.get(\"Description\"),\n",
" \"category\": csv_data.get(\"Category\")\n",
" }\n",
" )\n",
" )\n"
"\n",
" for result in scraped_results:\n",
" markdown_content = result.get(\"markdown\")\n",
" title = result.get(\"metadata\").get(\"title\")\n",
" url = result.get(\"metadata\").get(\"sourceURL\")\n",
" documents.append(\n",
" Document(\n",
" text=markdown_content,\n",
" metadata={\n",
" \"title\": title,\n",
" \"url\": url,\n",
" \"description\": csv_data.get(\"Description\"),\n",
" \"category\": csv_data.get(\"Category\")\n",
" }\n",
" )\n",
" )\n"
]
},
{
Expand Down Expand Up @@ -736,4 +735,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}