diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2024-11-24 13:08:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-24 13:08:25 +0100 |
| commit | 26a033b3ec1269d3927831bda1749a484ed83733 (patch) | |
| tree | c3ff3641baea401f066ad1b80ac239faaa5b2605 /examples/useragents/edge.js | |
| parent | d2aec146ac5a2aef4a87813be47e5e1dc7404c51 (diff) | |
Generate random user agent when non is provided (#76)
Diffstat (limited to 'examples/useragents/edge.js')
| -rw-r--r-- | examples/useragents/edge.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/useragents/edge.js b/examples/useragents/edge.js new file mode 100644 index 0000000..1e76131 --- /dev/null +++ b/examples/useragents/edge.js @@ -0,0 +1,12 @@ +import { parse } from "flyscrape"; + +export const config = { + url: "https://learn.microsoft.com/en-us/deployedge/microsoft-edge-release-schedule", +}; + +export default function ({ doc, absoluteURL }) { + const links = doc.find("table a"); + return links + .map(link => link.text()) + .filter(Boolean) +} |