Add support for konbata
This commit is contained in:
parent
2b9468a545
commit
485fca9132
|
@ -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'<li><b><a href="{html.escape(feedurl[26:])}">{html.escape(inp[-1][1:])}</a> (<a href="{html.escape(feedurl[26:])}">feed</a>)</b></li>'
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue