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 04-11-2018, 03:13 PM   #1
RayV
Junior Member
RayV began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2013
Device: Kobo Mini
Slate articles class identifier changes

The class identifiers for some of the Slate articles pages have changed, in particular the technology pages which I'm interested in, which also don't now have the *.single.html pages.

I can get the article header and content with changes to slate.recipe, but then there are no images included.

Spoiler:
--- slate.recipe
+++ slate.recipe
@@ -27,3 +27,2 @@
- dict(name='header', attrs={'class': 'article-header'}),
- dict(name='section', attrs={
- 'class': lambda x: x and 'content' == x.strip()}),
+ dict(name='header', attrs={'class':'article__header'}),
+ dict(name='div', attrs={'class':"article__content"}),
@@ -32,4 +31 @@
- dict(id='header_social'),
- dict(attrs={'class': ['prop-name', 'prop-desc', 'authorbox',
- 'twitter', 'email', 'facebook', 'follow-links', 'join-in']}),
- dict(attrs={'class': lambda x: x and 'sharing-buttons' in x.split()}),
+ dict(name='ul', attrs={'class':"social-share"}),
@@ -38,3 +33,0 @@
- def print_version(self, url):
- return url.replace('.html', '.single.html')
-
@@ -44 +36,0 @@
- ('News & Politics', '/articles/news_and_politics.html'),
@@ -46,6 +37,0 @@
- ('Business', '/articles/business.html'),
- ('Arts', '/articles/arts.html'),
- ('Life', '/articles/life.html'),
- ('Health & Science', '/articles/health_and_science.html'),
- ('Sports', '/articles/sports.html'),
- ('Double X', '/articles/double_x.html'),

RayV is offline   Reply With Quote
Old 04-11-2018, 10:57 PM   #2
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: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...02ca42fbe47b25
kovidgoyal is offline   Reply With Quote
Advert
Old 04-12-2018, 05:34 AM   #3
RayV
Junior Member
RayV began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2013
Device: Kobo Mini
Many thanks - a great response and result from my point of view, but I think I didn't make clear the 'some' in my posting.

It seems the changes on the Slate site go a lot deeper than this.

This update works perfectly for News & Politics, Technology, and Business, and works in part for Arts, and Health & Science - the social stuff is not removed.

Life, Sports, and Double X only work to the previous recipe.


Maybe Slate are in the process of reformatting their pages?
RayV is offline   Reply With Quote
Old 04-12-2018, 07:10 AM   #4
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: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If different parts of their site have different formatting, then yeah probably they are in the process of moving to a new layout. Wait a couple fo weeks and see if ti settles down, if not the recipe can always be modified to deal with both layouts.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rss articles web articles - not showing pocket? they used to be able too wakkaday Kobo Reader 4 03-05-2016 04:35 AM
Aura H2O MicroSDHC card class 4 or class 10? chipro12 Kobo Reader 5 07-04-2015 02:24 AM
PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important Renji Sony Reader 11 12-03-2011 12:30 PM
Slate News Source omits most articles and has duplicates gk_jam Calibre 4 08-29-2010 02:33 PM
The Slate The Best of Slate 2002 TadW Deals and Resources (No Self-Promotion or Affiliate Links) 1 08-08-2003 11:49 AM


All times are GMT -4. The time now is 10:07 AM.


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