From aeff01ad00f9a7c4a0f2cbcaf2bf11b1ebdee2cc Mon Sep 17 00:00:00 2001 From: obosob Date: Thu, 30 Jul 2015 20:45:23 +0000 Subject: [PATCH] Escape regex . (dot), they need to be literal --- rtv/content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtv/content.py b/rtv/content.py index 2bdb6b3..cdaccef 100644 --- a/rtv/content.py +++ b/rtv/content.py @@ -106,7 +106,7 @@ class BaseContent(object): displayed through the terminal. """ - reddit_link = re.compile("https?://(www.)?(np.)?redd(it.com|.it)/r/.*") + reddit_link = re.compile("https?://(www\.)?(np\.)?redd(it\.com|\.it)/r/.*") reddit_link_no_host = re.compile("/r/.*") author = getattr(sub, 'author', '[deleted]') name = getattr(author, 'name', '[deleted]')