I'm working on a recipe for a certain site, that has the publication date and author on the article pages only, not on the index page.
So I though I could subclass populate_article_metadata to set this data in the article object like this:
Code:
def populate_article_metadata(self, article, soup, first):
article.date = soup.find('div', {"class": "date"}).contents[0].strip()
article.author = soup.find('div', {"class": "author"}).contents[0].strip()
It doesn't work however, as I now get the following error for every article it tries to download:
Code:
3% Article download failed: u'Some article'
Could not fetch link http://www.somedomain.com/somearticle
Any idea what I'm doing wrong?