Ignoring feedsportal.

This commit is contained in:
Samuel Clay 2016-04-18 16:17:15 -07:00
parent fd26addf28
commit a22a3fe1f7
2 changed files with 6 additions and 4 deletions

View file

@ -1062,7 +1062,6 @@ class PaymentHistory(models.Model):
now = datetime.datetime.now()
start_date = datetime.datetime(now.year, 1, 1) - dateutil.relativedelta.relativedelta(years=y)
end_date = datetime.datetime(now.year, 1, 1) - dateutil.relativedelta.relativedelta(years=y-1) - datetime.timedelta(seconds=1)
print start_date, end_date
if end_date > now: end_date = now
year_totals[now.year - y] = _counter(start_date, end_date)

View file

@ -554,9 +554,12 @@ class Feed(models.Model):
feed_address = found_feed_urls[0]
if feed_address:
if (feed_address.endswith('feedburner.com/atom.xml') or
feed_address.endswith('feedburner.com/feed/')):
logging.debug(" ---> Feed points to 'Wierdo', ignoring.")
if any(ignored_domain in feed_address for ignored_domain in [
'feedburner.com/atom.xml',
'feedburner.com/feed/',
'feedsportal.com',
]):
logging.debug(" ---> Feed points to 'Wierdo' or 'feedsportal', ignoring.")
return False, self
try:
self.feed_address = feed_address