11-01-2010, 05:15 PM | #16 |
Zealot
Posts: 122
Karma: 10
Join Date: Jul 2010
Device: nook
|
i would love it if you could share the code you built. i am stuck on trying to append the article.text_summary to feeds. it keeps telling me that i am missing a title element. i tried feeds.append((title,textsum)) when title='1' and textsum is a list of article.text_summary. no go at all.
|
11-03-2010, 03:47 PM | #17 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Is this not clear? ... "I put an article_title_list = [] and index n = 0 outside the functions, then used self.article_title_list.append(article.text_summar y) inside parse_feeds and self.article_title_list[self.n] inside postprocess_html to access it and self.n = self.n + 1 inside postprocess_html to increment the index. " |
|
Advert | |
|
11-03-2010, 04:27 PM | #18 |
Zealot
Posts: 122
Karma: 10
Join Date: Jul 2010
Device: nook
|
i think i got it this time.
i am still a bit lost with the local and global variables in python.... |
11-03-2010, 05:00 PM | #19 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I'm certainly no expert in Python either. However, you do need to get the title out of parse_feeds, where it's local, and into the html processing. parse_feeds will be long gone by the time html processing (pre or post) begins, and it gets restarted for each article.
|
11-03-2010, 05:21 PM | #20 |
Zealot
Posts: 122
Karma: 10
Join Date: Jul 2010
Device: nook
|
that makes a lot of sense.
i think i got it more or less. the recipe that is. the descriptions are one off from the article, but that is peanuts. and the recipe is downloaded and i did it. thank you very much. you have no idea how much this helps me.... |
Advert | |
|
11-03-2010, 10:11 PM | #21 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
Thread Tools | Search this Thread |
|