Scraping on steroids.

Flyscrape is a standalone and scriptable web scraper, combining the speed of Go with the flexibility of JavaScript. — Focus on data extraction rather than request juggling.
hackernews.js
export const config = {
    url: "https://news.ycombinator.com/",
}

export default function ({ doc }) {
    const title = doc.find("title");
    const posts = doc.find(".athing");

    return {
        title: title.text(),
        posts: posts.map((post) => {
            const link = post.find(".titleline > a");

            return {
                title: link.text(),
                url: link.attr("href"),
            };
        }),
    }
}
Terminal
> flyscrape run hackernews.js
[
  {
    "url": "https://news.ycombinator.com/",
    "data": {
      "title": "Hacker News",
      "posts": [
        {
          "title": "Flyscrape - An standalone and scriptable web scraper",
          "url": "https://flyscrape.com/"
        },
        ...
      ]
    }
  }
]

Installation

Install using Homebrew or download a pre-compiled binary to your system.
Visit the Installation Instructions for more details.
Terminal
brew install flyscrape                          

Features

Flyscrape comes with a ton of features allowing you to customize it to your needs.