Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2016, 10:47 AM   #1
AlanD
Junior Member
AlanD began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: Kindle
The Independent (UK) - removing dup pictures

Help, please, in suppressing identical galleries.

Many pages have items in the middle with headings such as 'World news in pictures' or 'Donald Trump's most controversial quotes'. It gets boring having to scroll through the same stuff many times.

They come from, for example, http://www.independent.co.uk/news/wo...-a7318011.html

Line 462 is </script><div class="container grid-mod-gallery" data-scald-gallery="3906401"> and 838 is </div><!-- END scald=3906401 --></div></div>. This block defines the 30 pictures and text which gets pulled in here and on other pages.

Is there a way to suppress it totally?
AlanD is offline   Reply With Quote
Old 09-20-2016, 01:19 PM   #2
AlanD
Junior Member
AlanD began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: Kindle
Looks like commenting out lines 38 to 51 in the recipe is what's needed. This kills preprocess_html.

The recipe has had to be changed to use, for example, http://www.independent.co.uk/news/uk/rss rather than http://www.independent.co.uk/news/uk/?service=rss (Kovid already fixed this last week, I see. Thanks, as always.)

I'm checking to see if any of the RSS feeds have been renamed and therefore lost and will report back if I make any further alterations to my copy of the recipe.
AlanD is offline   Reply With Quote
Advert
Old 09-20-2016, 09:37 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,334
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Line 34 of the builtin recipe already removes that section.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing padding around pictures rosshalde ePub 3 11-21-2014 01:36 PM
Independent Series jbcohen Reading Recommendations 3 07-22-2014 11:18 PM
The Independent not working in v1.37 colint Recipes 2 05-23-2014 06:31 AM
PRS-505 Removing pictures crsheilah Sony Reader 7 02-01-2011 09:46 AM


All times are GMT -4. The time now is 11:18 PM.


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