Skip to content

Commit

Permalink
Add crawler for 'marydeath'
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Jan 19, 2016
1 parent e2a1700 commit 9b27bc5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions comics/comics/marydeath.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase


class ComicData(ComicDataBase):
name = 'Mary Death'
language = 'en'
url = 'http://www.marydeathcomics.com/'
start_date = '2013-01-17'
rights = 'Matthew Tarpley, CC BY-NC 3.0'


class Crawler(CrawlerBase):
history_capable_days = 365
time_zone = 'US/Eastern'

def crawl(self, pub_date):
feed = self.parse_feed('http://www.marydeathcomics.com/feed')
for entry in feed.for_date(pub_date):
url = entry.summary.src('img[src*="/wp-content/uploads/"]')
if not url:
continue
url = url.replace('-150x150', '')
title = entry.title
return CrawlerImage(url, title)
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ v2.4.2 (UNRELEASED)
**Crawlers**

- New: ``bloomcounty2015``
- New: ``marydeath``
- New: ``sarahcandersen``
- New: ``thedanemen``
- New: ``unsounded``
Expand Down

0 comments on commit 9b27bc5

Please sign in to comment.