Skip to content
Open
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true
},
"javascript": {
"formatter": {
"enabled": true
}
}
}
2 changes: 1 addition & 1 deletion examples/scrape_and_analyze_airbnb_data_e2b/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tool } from '@anthropic-ai/sdk/src/resources/beta/tools'
import type { Tool } from '@anthropic-ai/sdk/src/resources/beta/tools'

export const MODEL_NAME = 'claude-3-opus-20240229'

Expand Down
10 changes: 5 additions & 5 deletions examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ts-ignore
import * as fs from 'fs'
//@ts-expect-error
import * as fs from 'node:fs'
import FirecrawlApp from '@mendable/firecrawl-js'
import 'dotenv/config'
import { config } from 'dotenv'
Expand Down Expand Up @@ -38,9 +38,9 @@ export async function scrapeAirbnb() {

// Start crawling to get pagination links
const linksData = await app.scrapeUrl(listingsUrl, params2)
console.log(linksData.data['llm_extraction'])
console.log(linksData.data.llm_extraction)

let paginationLinks = linksData.data['llm_extraction'].page_links.map(
let paginationLinks = linksData.data.llm_extraction.page_links.map(
(link) => baseUrl + link.link
)

Expand Down Expand Up @@ -74,7 +74,7 @@ export async function scrapeAirbnb() {
// Function to scrape a single URL
const scrapeListings = async (url) => {
const result = await app.scrapeUrl(url, params)
return result.data['llm_extraction'].listings
return result.data.llm_extraction.listings
}

// Scrape all pagination links in parallel
Expand Down