mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Updated weblogs_sll and The Age
This commit is contained in:
parent
d70cb9f6e2
commit
d20bd1f8b1
@ -47,13 +47,14 @@ class TheAge(BasicNewsRecipe):
|
|||||||
if url.startswith('/'):
|
if url.startswith('/'):
|
||||||
url = 'http://www.theage.com.au' + url
|
url = 'http://www.theage.com.au' + url
|
||||||
title = self.tag_to_string(tag)
|
title = self.tag_to_string(tag)
|
||||||
sections[section].append({
|
if url != 'http://www.theage.com.au':
|
||||||
'title': title,
|
sections[section].append({
|
||||||
'url' : url,
|
'title': title,
|
||||||
'date' : strftime('%a, %d %b'),
|
'url' : url,
|
||||||
'description' : '',
|
'date' : strftime('%a, %d %b'),
|
||||||
'content' : '',
|
'description' : '',
|
||||||
})
|
'content' : '',
|
||||||
|
})
|
||||||
|
|
||||||
feeds = []
|
feeds = []
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '4 February 2011, desUBIKado'
|
__copyright__ = '4 February 2011, desUBIKado'
|
||||||
__author__ = 'desUBIKado'
|
__author__ = 'desUBIKado'
|
||||||
__version__ = 'v0.07'
|
__version__ = 'v0.08'
|
||||||
__date__ = '13, November 2011'
|
__date__ = '30, June 2012'
|
||||||
'''
|
'''
|
||||||
http://www.weblogssl.com/
|
http://www.weblogssl.com/
|
||||||
'''
|
'''
|
||||||
@ -33,6 +33,7 @@ class weblogssl(BasicNewsRecipe):
|
|||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Xataka', u'http://feeds.weblogssl.com/xataka2')
|
(u'Xataka', u'http://feeds.weblogssl.com/xataka2')
|
||||||
|
,(u'Xataka Smart Home', u'http://feeds.weblogssl.com/Xatakahome')
|
||||||
,(u'Xataka Mexico', u'http://feeds.weblogssl.com/xatakamx')
|
,(u'Xataka Mexico', u'http://feeds.weblogssl.com/xatakamx')
|
||||||
,(u'Xataka M\xf3vil', u'http://feeds.weblogssl.com/xatakamovil')
|
,(u'Xataka M\xf3vil', u'http://feeds.weblogssl.com/xatakamovil')
|
||||||
,(u'Xataka Android', u'http://feeds.weblogssl.com/xatakandroid')
|
,(u'Xataka Android', u'http://feeds.weblogssl.com/xatakandroid')
|
||||||
@ -107,12 +108,14 @@ class weblogssl(BasicNewsRecipe):
|
|||||||
|
|
||||||
# Para obtener la url original del articulo a partir de la de "feedsportal"
|
# Para obtener la url original del articulo a partir de la de "feedsportal"
|
||||||
# El siguiente código es gracias al usuario "bosplans" de www.mobileread.com
|
# El siguiente código es gracias al usuario "bosplans" de www.mobileread.com
|
||||||
# http://www.mobileread.com/forums/showthread.php?t=130297
|
# http://www.mobileread.com/forums/sho...d.php?t=130297
|
||||||
|
|
||||||
def get_article_url(self, article):
|
def get_article_url(self, article):
|
||||||
link = article.get('link', None)
|
link = article.get('link', None)
|
||||||
if link is None:
|
if link is None:
|
||||||
return article
|
return article
|
||||||
|
if link.split('/')[-4]=="xataka2":
|
||||||
|
return article.get('feedburner_origlink', article.get('link', article.get('guid')))
|
||||||
if link.split('/')[-1]=="story01.htm":
|
if link.split('/')[-1]=="story01.htm":
|
||||||
link=link.split('/')[-2]
|
link=link.split('/')[-2]
|
||||||
a=['0B','0C','0D','0E','0F','0G','0N' ,'0L0S','0A']
|
a=['0B','0C','0D','0E','0F','0G','0N' ,'0L0S','0A']
|
||||||
@ -121,6 +124,3 @@ class weblogssl(BasicNewsRecipe):
|
|||||||
link=link.replace(a[i],b[i])
|
link=link.replace(a[i],b[i])
|
||||||
link="http://"+link
|
link="http://"+link
|
||||||
return link
|
return link
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user