aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index ea04fb12..a23584e0 100755
--- a/utils.py
+++ b/utils.py
@@ -20,6 +20,7 @@ import string
import hashlib
import sqlite3
import operator
+import urlparse
import smtplib
from email.mime.text import MIMEText
@@ -209,6 +210,8 @@ def search_feed(url):
page = urllib2.urlopen(url)
soup = BeautifulSoup(page)
for feed_link in soup('link', type='application/atom+xml'):
+ if url not in feed_link['href']:
+ return urlparse.urljoin(url, feed_link['href'])
return feed_link['href']
return None
bgstack15