![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 3
|
Dynamic categories
My favorite news website is 'delfi.lt' which mostly provides excellent RSS feeds. But in addition to them there are also 'RSS Index' feeds which contain some more categories in themselves.
An example of an 'RSS Index' feed for 'Mokslas' category: http://www.delfi.lt/mokslas/rss/ This XML contains some additional dynamic categories (they are added or removed depending on current events in the world), such as 'Login 2017' or 'Sugalvota Lietuvoje', and links to their separate XMLs. However, calibre seems to treat XMLs of the additional categories as articles and the output in the final ebook is like this: http://www.delfi.lt/mokslas/rss/feeds/login.xml http://www.delfi.lt/m360/naujausi-straipsniai/login-2017-pasibaigus-kas-labiausiai-istrigo-siais-metais.d?id=74797050&utm_source=rss&utm_medium=rss &utm_campaign=rss http://www.delfi.lt/m360/naujausi-straipsniai/login-2017-pasibaigus-kas-labiausiai-istrigo-siais-metais.d?id=74797050 http://www.delfi.lt/m360/naujausi-straipsniai/login-2017-pasibaigus-kas-labiausiai-istrigo-siais-metais.d?id=74797050&utm_source=rss&utm_medium=rss &utm_campaign=rss&com=1 Wed, 31 May 2017 09:38:49 +0300 http://www.delfi.lt/mokslas/login/papasakojo-apie-snipus-lietuvoje-kaip-jie-verbuoja.d?id=74779490&utm_source=rss&utm_medium=r ss&utm_campaign=rss http://www.delfi.lt/mokslas/login/papasakojo-apie-snipus-lietuvoje-kaip-jie-verbuoja.d?id=74779490 http://www.delfi.lt/mokslas/login/papasakojo-apie-snipus-lietuvoje-kaip-jie-verbuoja.d? and so on. How to convert these (sub)categories into proper categories? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,185
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can re-implement parse_feeds() in your recipe to do whatever you like with the XML.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 3
|
Thanks for the reply. However, I should have mentioned that my knowledge of Python is quite limited, so I can't figure out how to use that function specifically to find and merge all articles from all subcategories from http://www.delfi.lt/mokslas/rss/ into a single category 'Mokslas'. Can you provide an example?
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,185
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sorry, I dont have the time for that.
|
![]() |
![]() |
![]() |
Tags |
news feed, news recipe |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for help with Dynamic DNS | Hampshire Nanny | General Discussions | 4 | 12-24-2016 09:11 PM |
Dynamic fonts? | Ghitulescu | ePub | 8 | 01-27-2015 01:10 PM |
dynamic content manipulation | maze | ePub | 1 | 02-15-2013 11:01 PM |
Dynamic keymaps | Mackx | iRex Developer's Corner | 42 | 04-25-2012 08:56 AM |
0.7.47 - User Categories & Sub-Categories | nynaevelan | Library Management | 0 | 02-28-2011 06:11 PM |