From 485fca913268e9291b42a85b2dcab6dca207aba8 Mon Sep 17 00:00:00 2001 From: blank X Date: Mon, 9 Aug 2021 21:29:37 +0700 Subject: [PATCH] Add support for konbata --- genbloglist.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/genbloglist.py b/genbloglist.py index 8199cd1..d5bdf17 100644 --- a/genbloglist.py +++ b/genbloglist.py @@ -36,6 +36,11 @@ with open(sys.argv[1]) as file, open(sys.argv[2], 'w+') as out: inp = shlex.split(i, comments=True) if 'blog' in inp[1:]: feedurl = inp[0] + if feedurl.startswith('exec:~/.local/bin/konbata '): + text = f'
  • {html.escape(inp[-1][1:])} (feed)
  • ' + print(text) + out.write(text) + continue try: with urlopen(Request(feedurl, headers={'User-Agent': "stop being so fucking obsessed that i'm using urllib ffs"}), timeout=60) as resp: if resp.status != 200: