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 10-02-2014, 08:59 PM   #1
Beamer Smith
Junior Member
Beamer Smith began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2014
Device: Kobo
How do you alter the TimeOut?

I'm trying to download the Business Times (of India) and it always crashes after 90 minutes.. which leads me to believe it is a timout problem. Is there a way to extend the timeout for a download -either for one recipie or globally?

Thank you in advance
Beamer Smith
Beamer Smith is offline   Reply With Quote
Old 10-02-2014, 11:18 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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If a recipe is taking ninety minutes to download, its probably broken and needs to be updated for website changes.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-07-2014, 10:32 AM   #3
NSILMike
Guru
NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.NSILMike turned on, tuned in, and dropped out.
 
Posts: 735
Karma: 35936
Join Date: Apr 2011
Location: Shrewsury, MA
Device: Lenovo Android Tablet
I believe Kovid is right... but you can extend the timeout by going to Preferences, then Miscellaneous. I had to do this for the New York Times... it varies a bit day by day, but to be sure it doesn't time out, I had to increase the default to 45 minutes.
NSILMike is offline   Reply With Quote
Old 10-09-2014, 04:43 PM   #4
Beamer Smith
Junior Member
Beamer Smith began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2014
Device: Kobo
I will give that a try while waiting for the original "creator" to look at it..


Thank you both
Beamer Smith is offline   Reply With Quote
Old 04-30-2016, 04:17 PM   #5
Sambit
Junior Member
Sambit began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2016
Device: Kindle
Times of India Recipe Fix

I think Times of India Recipe is trying to aggregate way too much info and now the Times of India site presents articles, videos and blogs all interspersed leading to a painful content for Kindle.

Moreover, the print article URLs have changed.

Here is my update for articles only:

Code:
__license__   = 'GPL v3'
__copyright__ = '2008-2014, Karthik <hashkendistro@gmail.com>'
'''
timesofindia.indiatimes.com
'''


from calibre.web.feeds.news import BasicNewsRecipe

class TheEconomicTimes(BasicNewsRecipe):
    title                  = 'The Times of India'
    __author__             = 'Sambit Kumar Dash'
    description            = 'News from the Indian daily Times of India'
    publisher              = 'timesofindia.indiatimes.com'
    category               = 'news, finances, politics, sports, business, entertainment, India'
    oldest_article         = 1
    max_articles_per_feed  = 100
    no_stylesheets         = True
    use_embedded_content   = False
    simultaneous_downloads = 1
    encoding               = 'utf-8'
    language               = 'en_IN'
    publication_type       = 'newspaper'
    masthead_url           = 'http://timesofindia.indiatimes.com/photo.cms?msid=2419189'
    extra_css              = """
                                 body{font-family: Arial,Helvetica,sans-serif}
                                 .foto_mg{font-size: 60%; 
                                          font-weight: 700;}
                                 h1{font-size: 150%;}
                                 artdate{font-size: 60%}
                                 artag{font-size: 60%}
                                 div.storycontent{padding-top: 10px}
                             """
    conversion_options     = {'comment'          : description, 
                              'tags'             : category,
                              'publisher'        : publisher,
                              'language'         : language
                             }
    remove_tags_before     = dict(name='h1')
    remove_tags_after      = dict(name='div', attrs={'class':'storycontent'})
    remove_attributes      = ['xmlns']
    remove_tags			   = [dict(name='div', attrs={'class':'readalso'})]
    
    feeds                  = [('Recent Stories', 'http://timesofindia.indiatimes.com/rssfeeds/1221656.cms'),
                              ('India', 'http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms'),
                              ('World', 'http://timesofindia.indiatimes.com/rssfeeds/296589292.cms'),
                              ('Business', 'http://timesofindia.indiatimes.com/rssfeeds/1898055.cms'),
                              ('Cricket', 'http://timesofindia.indiatimes.com/rssfeeds/4719161.cms'),
                              ('Sports', 'http://timesofindia.indiatimes.com/rssfeeds/4719148.cms'),
                              ('Tech', 'http://timesofindia.indiatimes.com/rssfeeds/5880659.cms'),
                              ('Education', 'http://timesofindia.indiatimes.com/rssfeeds/913168846.cms'),
                              ('Science', 'http://timesofindia.indiatimes.com/rssfeeds/-2128672765.cms'),
                              ('Opinion', 'http://timesofindia.indiatimes.com/rssfeeds/784865811.cms'),
                              ('Entertainment', 'http://timesofindia.indiatimes.com/rssfeeds/1081479906.cms')]


    #Uses the mobile print version. For web print version use 'http://timesofindia.indiatimes.com/articleshow/<article_id>?prtpage=1'
    def print_version(self, url):
        #rest, sep, article_id = url.rpartition('/articleshow/')
        found = url.find('/articleshow/');
        
        # If /articleshow/ is not found it's not an article and can be ignored. 
        # If found replace the URL for print. 
        if found == -1:
            return ' '
        else:
            url = url.replace('/articleshow/', '/articleshowprint/')
        #return 'http://m.timesofindia.com/PDAET/articleshow/' + article_id
        return url

    def get_article_url(self, article):
        rurl = article.get('guid',  None)
        if (rurl.find('/quickieslist/') > 0) or (rurl.find('/quickiearticleshow/') > 0):
            return None
        return rurl

    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        return soup

    def postprocess_html(self, soup, first_fetch):
        return self.adeify_images(soup)
Sambit is offline   Reply With Quote
Advert
Reply

Tags
time, timeout, timesofindia


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alter the indentation of ToC Arkadian Editor 6 09-28-2014 12:24 AM
How do you alter the line spacing? Lynx-lynx Sony Reader 3 12-12-2012 03:55 AM
Alter built-in recipe for IP-based authentication barium Recipes 0 05-19-2012 02:20 AM
Using Sigil/Indesign to alter an ebook CSS Michael Grossman General Discussions 2 06-13-2011 11:57 AM
Can't alter 'Now Reading' List shelmed Kobo Reader 7 08-24-2010 07:36 AM


All times are GMT -4. The time now is 12:31 AM.


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