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 06-29-2022, 02:48 AM   #1
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 618
Karma: 85520
Join Date: May 2021
Device: kindle
The week(India) update

https://github.com/kovidgoyal/calibr...he_week.recipe

present recipe doesn't work anymore and the feeds aren't updated regularly from their side.
Attached Files
File Type: recipe The Week Magazine.recipe (1.8 KB, 94 views)
unkn0wn is offline   Reply With Quote
Old 06-29-2022, 02:56 AM   #2
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 618
Karma: 85520
Join Date: May 2021
Device: kindle
another update

update eenadu https://github.com/kovidgoyal/calibr.../eenadu.recipe

To remove older articles add
Code:
from datetime import date, datetime, timedelta
from calibre.utils.date import parse_date

def preprocess_html(self, soup):
        div = soup.find('div', **classes('pub-t'))
        if div:  
            date = parse_date(
                self.tag_to_string(div)
                    .strip().replace('Published : ','').replace('Updated : ','').replace(' IST',':00.000001')
                ).replace(tzinfo=None)
            today = datetime.now()
            if (today - date) > timedelta(1.5):
                self.abort_article('Skipping old article')
        else: # may not be an artilce.
            self.abort_article()
        return soup
and replace lines 55-61 with

Code:
# Finding all the section titles that are acceptable
        for x in nav_div.findAll(['a']):
            if self.is_accepted_entry(x):
                sec = self.tag_to_string(x)
                link = x['href']
                if link.endswith('telangana'):
                    sec = 'తెలంగాణ'
                if link.endswith('andhra-pradesh'):
                    sec = 'ఆంధ్రప్రదేశ్'
                if link.endswith('andhra-pradesh/districts'):
                    sec = 'ఆంధ్రప్రదేశ్.. ఆసక్తికర జిల్లా వార్తలు'
                if link.endswith('telangana/districts'):
                    sec = 'తెలంగాణ.. ఆసక్తికర జిల్లా వార్తలు'
                section_list.append((sec, link))
        feeds = []
unkn0wn is offline   Reply With Quote
Advert
Old 06-29-2022, 03:26 AM   #3
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 618
Karma: 85520
Join Date: May 2021
Device: kindle
https://github.com/kovidgoyal/calibr...a_today.recipe

India today .. better cover url
Code:
def get_cover_url(self):
        soup = self.index_to_soup('https://www.readwhere.com/magazine/the-india-today-group/India-Today/1154')
        for citem in soup.findAll('meta', content=lambda s: s and s.endswith('/magazine/300/new')):
            return citem['content'].replace('300', '600')
https://github.com/kovidgoyal/calibr...agazine.recipe OPEN magazine

cover url isn't updated in the old link
Code:
def get_cover_url(self):
        soup = self.index_to_soup('https://openthemagazine.com/')
        tag = soup.find(attrs={'class': 'magazine-item mr-1'})
        if tag:
            self.cover_url = tag.find('img')['src']
        return getattr(self, 'cover_url', self.cover_url)
and Hindu BusinessLine print edition
Attached Files
File Type: recipe The Hindu BusinessLine Print Edition.recipe (3.1 KB, 91 views)
unkn0wn 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
Update India Today unkn0wn Recipes 8 07-25-2022 04:11 AM
Can anyone do 'The Week' and 'India Today' WeeklyMagazine recipes. No login required. unkn0wn Recipes 0 06-11-2021 05:39 AM
Caravan Magazine India Error In The New Update abhix3 Recipes 2 07-18-2020 10:43 PM
Touch I'm from India and want to buy nook but heard that can't use it in India nandini Barnes & Noble NOOK 11 10-15-2012 07:54 AM
Nook eInk getting a "major update" (v1.5) update next week =X= News 3 11-16-2010 12:54 PM


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


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