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-08-2021, 12:42 PM   #1
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 518
Karma: 82764
Join Date: May 2021
Device: kindle
Article link is hyperlinked into the text of every article of an RSS feed..

I have created an RSS feed in calibre recipe but every article's whole-text is hyperlinked.

I know its a source problem.. what can I add to the recipe code such that the <a href=" "> part at the start gets removed. I get some 30 articles from that RSS feed and each one gets hyperlinked.

I know its just an RSS feed.. but here's the link

class TheWeek(BasicNewsRecipe):
title = u'The Week - India'
language = 'en_IN'
__author__ = 'Myself'
oldest_article = 15 # days
max_articles_per_feed = 25

no_stylesheets = True
auto_cleanup = True

feeds = [
('Cover Story', 'https://www.theweek.in/theweek/cover.rss.html'),
('Sports', 'https://www.theweek.in/theweek/sports.rss.html'),
('Current', 'https://www.theweek.in/theweek/current.rss.html'),
('StateCan', 'https://www.theweek.in/theweek/statescan.rss.html'),
('Leisure', 'https://www.theweek.in/theweek/leisure.rss.html'),
('Business', 'https://www.theweek.in/theweek/business.rss.html'),
('Specials', 'https://www.theweek.in/theweek/specials.rss.html'),
('More', 'https://www.theweek.in/theweek/more.rss.html'),
('Society', 'https://www.theweek.in/leisure/society.rss.html'),

]
unkn0wn is offline   Reply With Quote
Old 09-09-2021, 01:24 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: 44,263
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...46e335af66adbf
kovidgoyal is offline   Reply With Quote
Advert
Old 09-10-2021, 02:30 AM   #3
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 518
Karma: 82764
Join Date: May 2021
Device: kindle


I updated the RSS links for India Today Magazine already present in built-in recipe, whose links stopped working.

I just changed the links like the above one.


from calibre.web.feeds.news import BasicNewsRecipe


class IndiaToday(BasicNewsRecipe):
title = u'India Today'
language = 'en_IN'
__author__ = 'Krittika Goyal'
oldest_article = 15 # days
max_articles_per_feed = 25

no_stylesheets = True
auto_cleanup = True

feeds = [
('The Big Story', 'https://www.indiatoday.in/rss/1206614'),
('Cover Story', 'https://www.indiatoday.in/rss/1206509'),
('Nation', 'https://www.indiatoday.in/rss/1206514'),
('States', 'https://www.indiatoday.in/rss/1206500'),
('Economy', 'https://www.indiatoday.in/rss/1206513'),

]
unkn0wn is offline   Reply With Quote
Old 09-10-2021, 02:50 AM   #4
unkn0wn
Fanatic
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 518
Karma: 82764
Join Date: May 2021
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
I just used the working India Today magazine links instead of daily updates rss in the above one.
unkn0wn is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove an article which contains "this article was sponsored" in the text ? epubli Recipes 1 10-18-2020 01:02 PM
Recipe to read article body from xml rss feed Rasheedgm Recipes 2 01-23-2017 01:47 PM
Getting no article from an RSS Feed macpablus Recipes 3 12-01-2016 10:15 PM
Help: When Article is Feed? _reader Recipes 2 06-14-2012 03:53 PM
Create Article Sections From Feed? Finbar127 Recipes 5 02-26-2011 08:55 AM


All times are GMT -4. The time now is 06:49 AM.


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