Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2010, 03:38 PM   #1
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
Trying to remove gallery pages

This is patterned after an article I read somewhere with respects to getting rid of pages with video in the title or url. It had something to do with the NY Times I think. I am trying on this one to get rid of gallery with no luck. Also if I wanted to do the same with "video" would I have to write another one of these or can they be combined.
Thanks

Spoiler:
def parse_feeds (self):
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
for article in feed.articles[:]:
print 'article.title is: ', article.title
if 'Gallery:' in article.title.upper() or 'gallery:' in article.url:
feed.articles.remove(article)
return feeds
mufc is offline   Reply With Quote
Old 12-18-2010, 05:02 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by mufc View Post
This is patterned after an article I read somewhere with respects to getting rid of pages with video in the title or url. It had something to do with the NY Times I think.
See here.

You need to make GALLERY all caps if you're going to test on upper case, and I don't think the colon will be in your url, so remove that.

You can add the VIDEO test in, too.

Last edited by Starson17; 12-18-2010 at 05:05 PM.
Starson17 is offline   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classic Split PDF pages into smaller pages (images into tiles) Astro Barnes & Noble NOOK 3 07-28-2010 04:55 PM
New hack PRS-505: multi status line with %read, time&pages reading, pages per minute. Car105 Sony Reader Dev Corner 5 01-03-2010 11:03 AM
Turning Scanned PDFs with facing pages into single pages jimteacher Workshop 5 11-09-2009 03:59 PM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 11:37 AM


All times are GMT -4. The time now is 05:36 AM.


MobileRead.com is a privately owned, operated and funded community.