View Single Post
Old 04-01-2012, 01:26 PM   #1
watou
Junior Member
watou began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle
Article not added when specifying content string

Hello,
I am writing a new recipe and the newspaper site has the full content of ten articles on one HTML page. I iterate through the page and append each article with an empty url but with full content, but these articles are silently skipped, leaving an empty section in the e-book. Here is the code:

Code:
        for post in ts.findAll('h1'):
            title = self.tag_to_string(post)
            self.log(title)
            url = ''
            date = ''
            content = self.tag_to_string(post.findNextSibling('p'))
            desc = content
            articles.append({'title':title, 'url':url, 'date':date, 'description':desc,
                'content':content})
The documentation for parse_index() says of the content dictionary entry: "The full article (can be an empty string). This is used by FullContentProfile" but I cannot find any documentation on FullContentProfile, or any clue why the content isn't being used. The recipe will be complete after I can fix this issue. Thanks in advance for any insight!
watou is offline   Reply With Quote