mirror of
https://github.com/zedeus/nitter.git
synced 2025-03-04 18:11:19 +00:00
Fix accounting for imgur.io
This commit is contained in:
parent
8a741f4d5f
commit
a5c6fe0ed3
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ let
|
|||
# Images aren't supported due to errors from Teddit when the image
|
||||
# wasn't first displayed via a post on the Teddit instance.
|
||||
|
||||
imgurRegex = re"((i|i.stack)\.)?imgur.(com|io)"
|
||||
imgurRegex = re"((i|i.stack)\.)?imgur\.(com|io)"
|
||||
|
||||
wwwRegex = re"https?://(www[0-9]?\.)?"
|
||||
m3u8Regex = re"""url="(.+.m3u8)""""
|
||||
|
@ -71,7 +71,7 @@ proc replaceUrls*(body: string; prefs: Prefs; absolute=""): string =
|
|||
if prefs.replaceReddit in result and "/gallery/" in result:
|
||||
result = result.replace("/gallery/", "/comments/")
|
||||
|
||||
if prefs.replaceImgur.len > 0 and "imgur.com" in result:
|
||||
if prefs.replaceImgur.len > 0 and "imgur" in result:
|
||||
result = result.replace(imgurRegex, prefs.replaceImgur)
|
||||
|
||||
if absolute.len > 0 and "href" in result:
|
||||
|
|
Loading…
Reference in a new issue