Follow all links on a page and print the titles, with XPath

xidel

  • Download and extract data from HTML/XML pages as well as JSON APIs.
    More information: <https://www.videlibri.de/xidel.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

xidel {{https://example.org}} --follow {{//a}} --extract {{//title}}

click the source code to copy install xidel on any operating system with command-not-found.com