commit 494c8bb6e66b5fe72c50fdba2738d464a28a8068 parent 7b8c8149d1a90a30d2b97f0d984d620ba97cf0ef Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sat, 20 Apr 2024 09:50:57 +0200 Merge branch 'master' of a3nm.net:git/mybin Diffstat:
hackernews_top_stories | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/hackernews_top_stories b/hackernews_top_stories @@ -0,0 +1,10 @@ +#!/bin/bash + +# return something if there are hacker news stories with score >1000 +# (see stuff that's really interesting, or major security vulnerabilities) +# very dirty: TODO better parsing, TODO use the API + +curl -s 'https://news.ycombinator.com/news' | grep -B1 'class="score"' | + grep -B1 ">.... points<" | grep 'class="title"' | + sed 's/.*href="http\([^>]*>[^<]*\).*/http\1/g' | sed 's/">/ /g' +