Platform
Resources
Pricing
Sign in
Get started
Martien van Steenbergen
Wise Fool. Visioneer.
Workspace
Fork
Public
By
Martien van Steenbergen
Edited
Apr 30, 2024
Fork of
In-browser data scraping
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
result
=
await
axios
(
{
method
:
"get"
,
url
:
url
}
)
;
Insert cell
Insert cell
$
=
cheerio
.
load
(
result
.
data
)
;
Insert cell
Insert cell
investors
=
$
(
"h2 a"
)
Insert cell
Insert cell
investorData
=
{
let
data
=
[
]
investors
.
each
(
(
i
,
item
)
=>
{
let
title
=
$
(
item
)
.
text
(
)
;
let
url
=
$
(
item
)
.
attr
(
"href"
)
;
data
.
push
(
{
title
:
title
,
url
:
url
}
)
}
)
;
yield
data
}
Insert cell
Insert cell
html
`
<table>
<tbody>
${
investorData
.
map
(
(
row
,
i
)
=>
html
`<tr><td>${
row
.
title
}</td><td>${
row
.
url
}</td></tr>`
)
}
</tbody>
</table>`
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
url
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
result
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
$
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
investors
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
investorData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
axios
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
cheerio
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML