mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update OMG! Ubuntu! recipe
This commit is contained in:
parent
1203d95022
commit
20da1fbc58
@ -1,23 +1,14 @@
|
|||||||
# -*- coding: utf-8 -*-
|
#!/usr/bin/env python
|
||||||
|
# vim:fileencoding=utf-8
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class OMGUbuntu(BasicNewsRecipe):
|
||||||
class BasicUserRecipe1318619832(BasicNewsRecipe):
|
title = u"Omg! Ubuntu!"
|
||||||
title = u'OmgUbuntu'
|
description = u"Online news site covering Ubuntu activities. Recipe pulls articles from past 7 days."
|
||||||
language = 'en'
|
language = 'en'
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
auto_cleanup = True
|
auto_cleanup = True
|
||||||
|
|
||||||
feeds = [(u'Omg Ubuntu', u'http://feeds.feedburner.com/d0od')]
|
feeds = [(u'Omg Ubuntu', u'https://www.omgubuntu.co.uk/feed')]
|
||||||
|
|
||||||
def get_masthead_url(self):
|
|
||||||
masthead = 'http://cdn.omgubuntu.co.uk/wp-content/themes/omgubuntu/images/logo.png'
|
|
||||||
br = BasicNewsRecipe.get_browser(self)
|
|
||||||
try:
|
|
||||||
br.open(masthead)
|
|
||||||
except:
|
|
||||||
self.log("\nCover unavailable")
|
|
||||||
masthead = None
|
|
||||||
return masthead
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user