View Single Post
Old 04-04-2017, 12:13 AM   #1
atsiong1
Junior Member
atsiong1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Kindle
The Intercept Recipe - TOC subheadings

Hi!

I recently created a recipe for The Intercept using Calibre's "Add Custom News Source" function. To do so, I copied and pasted the following feed: https://theintercept.com/feed/?lang=en

It worked great. Sadly, on my Kindle I find that in the TOC all of my article titles are collapsed under "Sections" -> "All Articles" -> Article_1, Article_2. I wish I could remove the extraneous header called "All Articles."

Can I correct this by using remove_tags or remove_tags_before in "Add Custom News Source" -> "Edit this recipe"?

So far I have attempted the following, to no avail:

------

#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1491254803(BasicNewsRecipe):
title = 'The Intercept'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
cover_url = 'https://prod01-cdn07.cdn.firstlook.org/assets/static/logo-rectangle.png'
remove_tags_before = dict(id='num_3')
feeds = [
('The Intercept', 'https://theintercept.com/feed/?lang=en'),
]

------

AND

-------

#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1491254803(BasicNewsRecipe):
title = 'The Intercept'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
cover_url = 'https://prod01-cdn07.cdn.firstlook.org/assets/static/logo-rectangle.png'
remove_tags_before = dict(attrs={'id': 'num_3'})
feeds = [
('The Intercept', 'https://theintercept.com/feed/?lang=en'),
]


Any help is greatly appreciated!
atsiong1 is offline   Reply With Quote