Listing page links with Lynx

February 12, 2023 - Reading time: ~1 minute

Sometimes you need to get a list of links on a website. Instead of trying to parse the HTML with some library you can just use Lynx.

The command looks like this:

lynx -dump -listonly 'https://blog.hexadust.net'

Output will be like:

References

1. https://blog.hexadust.net/rss.xml
2. https://blog.hexadust.net/
3. https://blog.hexadust.net/about
4. https://mastodon.sdf.org/@hxd
5. https://blog.hexadust.net/rss.xml
6. https://blog.hexadust.net/pdf-presentation-from-markdown
7. https://blog.hexadust.net/pdf-presentation-from-markdown
8. https://blog.hexadust.net/mounting-smb-drives-under-linux-the-old-school-way
9. https://blog.hexadust.net/mounting-smb-drives-under-linux-the-old-school-way
10. https://blog.hexadust.net/serving-files-over-http-from-synology-diskstation
11. https://blog.hexadust.net/serving-files-over-http-from-synology-diskstation
12. https://blog.hexadust.net/hello-world
13. https://blog.hexadust.net/hello-world
14. https://www.bludit.com/
15. https://mastodon.sdf.org/@hxd

Now you can use your UNIX foo to process it further.

Mastodon