1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/examples/history-api.fql
2021-03-06 01:25:37 -05:00

17 lines
381 B
Plaintext

LET page = DOCUMENT("https://soundcloud.com", { driver: "cdp"})
LET doc = page.mainFrame
WAIT_ELEMENT(doc, ".trendingTracks")
SCROLL_ELEMENT(doc, ".trendingTracks")
WAIT_ELEMENT(doc, ".trendingTracks .badgeList__item")
LET song = ELEMENT(doc, ".trendingTracks .badgeList__item")
CLICK(song)
WAIT_ELEMENT(doc, ".l-listen-hero")
RETURN {
page: page.url,
first: doc.url
}