Allowing twitter URL to not have https/http in it.

This commit is contained in:
Samuel Clay 2016-05-26 15:06:52 -07:00
parent 5db1138cdf
commit aa397194a1
2 changed files with 2 additions and 2 deletions

View file

@ -382,7 +382,7 @@ class Feed(models.Model):
if url and url.startswith('newsletter:'):
return cls.objects.get(feed_address=url)
if url and re.match('https?://twitter.com/\w+/?$', url):
if url and re.match('(https?://)?twitter.com/\w+/?$', url):
without_rss = True
if url and 'youtube.com/user/' in url:
username = re.search('youtube.com/user/(\w+)', url).group(1)

View file

@ -106,7 +106,7 @@ class FetchFeed:
(self.feed.title[:30], address))
return FEED_ERRHTTP, None
self.fpf = feedparser.parse(youtube_feed)
elif re.match('https?://twitter.com/\w+/?$', address):
elif re.match('(https?)?://twitter.com/\w+/?$', address):
# try:
twitter_feed = self.fetch_twitter(address)
# except Exception, e: