mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
various whitespace (extra-edit)
!partial 'E203,E222,E241,E271,E272'
This commit is contained in:
parent
41cee6f02d
commit
ed2930712d
@ -214,7 +214,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -27,25 +27,18 @@ class AdvancedUserRecipe(BasicNewsRecipe):
|
|||||||
remove_tags_after = dict(name='p', attrs={'class': ['firma-redazione']})
|
remove_tags_after = dict(name='p', attrs={'class': ['firma-redazione']})
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Politica',
|
(u'Politica', u'http://contropiano.org/news/politica-news/feed'),
|
||||||
u'http://contropiano.org/news/politica-news/feed'),
|
(u'Internazionale', u'http://contropiano.org/news/internazionale-news/feed'),
|
||||||
(u'Internazionale',
|
|
||||||
u'http://contropiano.org/news/internazionale-news/feed'),
|
|
||||||
(u'Aggiornamenti in breve', u'http://contropiano.org/news/aggiornamenti-in-breve/feed'),
|
(u'Aggiornamenti in breve', u'http://contropiano.org/news/aggiornamenti-in-breve/feed'),
|
||||||
(u'Economia',
|
(u'Economia', u'http://contropiano.org/news/news-economia/feed'),
|
||||||
u'http://contropiano.org/news/news-economia/feed'),
|
(u'Ambiente', u'http://contropiano.org/news/ambiente-news/feed'),
|
||||||
(u'Ambiente',
|
(u'Scienza', u'http://contropiano.org/news/scienza-news/feed'),
|
||||||
u'http://contropiano.org/news/ambiente-news/feed'),
|
(u'Cultura', u'http://contropiano.org/news/cultura-news/feed'),
|
||||||
(u'Scienza',
|
|
||||||
u'http://contropiano.org/news/scienza-news/feed'),
|
|
||||||
(u'Cultura',
|
|
||||||
u'http://contropiano.org/news/cultura-news/feed'),
|
|
||||||
(u'Locali', u'http://contropiano.org/regionali/feed'),
|
(u'Locali', u'http://contropiano.org/regionali/feed'),
|
||||||
(u'Lavoro', u'http://contropiano.org/news/lavoro-conflitto-news/feed'),
|
(u'Lavoro', u'http://contropiano.org/news/lavoro-conflitto-news/feed'),
|
||||||
(u'Malapolizia', u'http://contropiano.org/news/malapolizia-news/feed'),
|
(u'Malapolizia', u'http://contropiano.org/news/malapolizia-news/feed'),
|
||||||
(u'Interventi', u'http://contropiano.org/interventi/feed'),
|
(u'Interventi', u'http://contropiano.org/interventi/feed'),
|
||||||
(u'Documenti', u'http://contropiano.org/documenti/feed'),
|
(u'Documenti', u'http://contropiano.org/documenti/feed'),
|
||||||
(u'Vignette', u'http://contropiano.org/vignette/feed'),
|
(u'Vignette', u'http://contropiano.org/vignette/feed'),
|
||||||
(u'Altro',
|
(u'Altro', u'http://contropiano.org/altro/feed')
|
||||||
u'http://contropiano.org/altro/feed')
|
|
||||||
]
|
]
|
||||||
|
@ -214,7 +214,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -27,8 +27,7 @@ class iHeuteRecipe(BasicNewsRecipe):
|
|||||||
|
|
||||||
remove_attributes = ['width', 'height']
|
remove_attributes = ['width', 'height']
|
||||||
remove_tags = [dict(name='div', attrs={'id': ['zooming']}),
|
remove_tags = [dict(name='div', attrs={'id': ['zooming']}),
|
||||||
dict(name='div', attrs={
|
dict(name='div', attrs={'class': ['related', 'mapa-wrapper']}),
|
||||||
'class': ['related', 'mapa-wrapper']}),
|
|
||||||
dict(name='table', attrs={'id': ['opener-img', 'portal']}),
|
dict(name='table', attrs={'id': ['opener-img', 'portal']}),
|
||||||
dict(name='table', attrs={'class': ['video-16ku9']})]
|
dict(name='table', attrs={'class': ['video-16ku9']})]
|
||||||
remove_tags_after = [
|
remove_tags_after = [
|
||||||
|
@ -10,29 +10,21 @@ class AdvancedUserRecipe1286477122(BasicNewsRecipe):
|
|||||||
__author__ = 'egilh'
|
__author__ = 'egilh'
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Politica & Palazzo',
|
(u'Politica & Palazzo', u'http://www.ilfattoquotidiano.it/category/politica-palazzo/feed/'),
|
||||||
u'http://www.ilfattoquotidiano.it/category/politica-palazzo/feed/'),
|
(u'Giustizia & impunit\xe0', u'http://www.ilfattoquotidiano.it/category/giustizia-impunita/feed/'),
|
||||||
(u'Giustizia & impunit\xe0',
|
|
||||||
u'http://www.ilfattoquotidiano.it/category/giustizia-impunita/feed/'),
|
|
||||||
(u'Media & regime', u'http://www.ilfattoquotidiano.it/category/media-regime/feed/'),
|
(u'Media & regime', u'http://www.ilfattoquotidiano.it/category/media-regime/feed/'),
|
||||||
(u'Economia & Lobby',
|
(u'Economia & Lobby', u'http://www.ilfattoquotidiano.it/category/economia-lobby/feed/'),
|
||||||
u'http://www.ilfattoquotidiano.it/category/economia-lobby/feed/'),
|
(u'Lavoro & precari', u'http://www.ilfattoquotidiano.it/category/lavoro-precari/feed/'),
|
||||||
(u'Lavoro & precari',
|
(u'Ambiente & Veleni', u'http://www.ilfattoquotidiano.it/category/ambiente-veleni/feed/'),
|
||||||
u'http://www.ilfattoquotidiano.it/category/lavoro-precari/feed/'),
|
(u'Sport & miliardi', u'http://www.ilfattoquotidiano.it/category/sport-miliardi/feed/'),
|
||||||
(u'Ambiente & Veleni',
|
|
||||||
u'http://www.ilfattoquotidiano.it/category/ambiente-veleni/feed/'),
|
|
||||||
(u'Sport & miliardi',
|
|
||||||
u'http://www.ilfattoquotidiano.it/category/sport-miliardi/feed/'),
|
|
||||||
(u'Cronaca', u'http://www.ilfattoquotidiano.it/category/cronaca/feed/'),
|
(u'Cronaca', u'http://www.ilfattoquotidiano.it/category/cronaca/feed/'),
|
||||||
(u'Mondo', u'http://www.ilfattoquotidiano.it/category/mondo/feed/'),
|
(u'Mondo', u'http://www.ilfattoquotidiano.it/category/mondo/feed/'),
|
||||||
(u'Societ\xe0', u'http://www.ilfattoquotidiano.it/category/societa/feed/'),
|
(u'Societ\xe0', u'http://www.ilfattoquotidiano.it/category/societa/feed/'),
|
||||||
(u'Scuola', u'http://www.ilfattoquotidiano.it/category/scuola/feed/'),
|
(u'Scuola', u'http://www.ilfattoquotidiano.it/category/scuola/feed/'),
|
||||||
(u'Tecno', u'http://www.ilfattoquotidiano.it/category/tecno/feed/'),
|
(u'Tecno', u'http://www.ilfattoquotidiano.it/category/tecno/feed/'),
|
||||||
(u'Terza pagina', u'http://www.ilfattoquotidiano.it/category/terza-pagina/feed/'),
|
(u'Terza pagina', u'http://www.ilfattoquotidiano.it/category/terza-pagina/feed/'),
|
||||||
(u'Piacere quotidiano',
|
(u'Piacere quotidiano', u'http://www.ilfattoquotidiano.it/category/piacere-quotidiano/feed/'),
|
||||||
u'http://www.ilfattoquotidiano.it/category/piacere-quotidiano/feed/'),
|
(u'Cervelli in fuga', u'http://www.ilfattoquotidiano.it/category/cervelli-in-fuga/feed/'),
|
||||||
(u'Cervelli in fuga',
|
|
||||||
u'http://www.ilfattoquotidiano.it/category/cervelli-in-fuga/feed/'),
|
|
||||||
(u'Documentati!', u'http://www.ilfattoquotidiano.it/category/documentati/feed/'),
|
(u'Documentati!', u'http://www.ilfattoquotidiano.it/category/documentati/feed/'),
|
||||||
(u'Misfatto', u'http://www.ilfattoquotidiano.it/category/misfatto/feed/')
|
(u'Misfatto', u'http://www.ilfattoquotidiano.it/category/misfatto/feed/')
|
||||||
]
|
]
|
||||||
|
@ -34,7 +34,7 @@ class IlManifesto(BasicNewsRecipe):
|
|||||||
startSoup = self.index_to_soup(startUrl)
|
startSoup = self.index_to_soup(startUrl)
|
||||||
lastEdition = startSoup.findAll('div', id='accordion_inedicola')[
|
lastEdition = startSoup.findAll('div', id='accordion_inedicola')[
|
||||||
1].find('a')['href']
|
1].find('a')['href']
|
||||||
del (startSoup)
|
del startSoup
|
||||||
self.manifesto_index = MANIFESTO_BASEURL + lastEdition
|
self.manifesto_index = MANIFESTO_BASEURL + lastEdition
|
||||||
urlsplit = lastEdition.split('/')
|
urlsplit = lastEdition.split('/')
|
||||||
self.manifesto_datestr = urlsplit[-1]
|
self.manifesto_datestr = urlsplit[-1]
|
||||||
@ -106,5 +106,5 @@ class IlManifesto(BasicNewsRecipe):
|
|||||||
summary = sommNode
|
summary = sommNode
|
||||||
|
|
||||||
template = "<html><head><title>%(title)s</title></head><body><h1>%(title)s</h1><h2>%(subtitle)s</h2><h3>%(author)s</h3><div style='font-size: x-large;'>%(summary)s</div><div>%(content)s</div></body></html>" # noqa: E501
|
template = "<html><head><title>%(title)s</title></head><body><h1>%(title)s</h1><h2>%(subtitle)s</h2><h3>%(author)s</h3><div style='font-size: x-large;'>%(summary)s</div><div>%(content)s</div></body></html>" # noqa: E501
|
||||||
del (bs)
|
del bs
|
||||||
return template % dict(title=title, subtitle=subtitle, author=author, summary=summary, content=content)
|
return template % dict(title=title, subtitle=subtitle, author=author, summary=summary, content=content)
|
||||||
|
@ -214,7 +214,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -214,7 +214,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -56,8 +56,7 @@ class RealClear(BasicNewsRecipe):
|
|||||||
printhints = [['realclear', '', '', 'printpage'],
|
printhints = [['realclear', '', '', 'printpage'],
|
||||||
['billoreilly.com', 'Print this entry', 'a', ''],
|
['billoreilly.com', 'Print this entry', 'a', ''],
|
||||||
['billoreilly.com', 'Print This Article', 'a', ''],
|
['billoreilly.com', 'Print This Article', 'a', ''],
|
||||||
['politico.com', 'Print',
|
['politico.com', 'Print', 'a', 'share-print'],
|
||||||
'a', 'share-print'],
|
|
||||||
['nationalreview.com', '>Print<', 'a', ''],
|
['nationalreview.com', '>Print<', 'a', ''],
|
||||||
['reason.com', '', 'a', 'printer']
|
['reason.com', '', 'a', 'printer']
|
||||||
# The following are not supported due to JavaScripting, and would require obfuscated_article to handle
|
# The following are not supported due to JavaScripting, and would require obfuscated_article to handle
|
||||||
|
@ -171,4 +171,4 @@ class respektRecipe(BasicNewsRecipe):
|
|||||||
o.getparent().replace(o,e)
|
o.getparent().replace(o,e)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return (BeautifulSoup(lxml.etree.tostring(root,encoding='unicode')))
|
return BeautifulSoup(lxml.etree.tostring(root,encoding='unicode'))
|
||||||
|
@ -39,7 +39,7 @@ class StraitsTimes(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'World' , u'https://www.straitstimes.com/news/world/rss.xml')
|
(u'World', u'https://www.straitstimes.com/news/world/rss.xml'),
|
||||||
(u'Business', u'https://www.straitstimes.com/news/business/rss.xml'),
|
(u'Business', u'https://www.straitstimes.com/news/business/rss.xml'),
|
||||||
(u'Life', u'https://www.straitstimes.com/news/life/rss.xml'),
|
(u'Life', u'https://www.straitstimes.com/news/life/rss.xml'),
|
||||||
(u'Tech', u'https://www.straitstimes.com/news/tech/rss.xml'),
|
(u'Tech', u'https://www.straitstimes.com/news/tech/rss.xml'),
|
||||||
|
@ -60,8 +60,8 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Regions', 'http://newsinfo.inquirer.net/category/regions/feed'),
|
('Regions', 'http://newsinfo.inquirer.net/category/regions/feed'),
|
||||||
('Regions - Latest Stories', 'http://newsinfo.inquirer.net/category/latest-stories/regions-latest-stories/feed'),
|
('Regions - Latest Stories', 'http://newsinfo.inquirer.net/category/latest-stories/regions-latest-stories/feed'),
|
||||||
('News', 'http://www.inquirer.net/fullfeed'),
|
('News', 'http://www.inquirer.net/fullfeed'),
|
||||||
('More News' , 'http://newsinfo.inquirer.net/feed')
|
('More News', 'http://newsinfo.inquirer.net/feed'),
|
||||||
,
|
|
||||||
('Global Nation', 'http://globalnation.inquirer.net/feed'),
|
('Global Nation', 'http://globalnation.inquirer.net/feed'),
|
||||||
('Global Nation - Latest Stories', 'http://globalnation.inquirer.net/category/latest-stories/feed'),
|
('Global Nation - Latest Stories', 'http://globalnation.inquirer.net/category/latest-stories/feed'),
|
||||||
('Global Nation - Philippines', 'http://globalnation.inquirer.net/category/news/philippines/feed'),
|
('Global Nation - Philippines', 'http://globalnation.inquirer.net/category/news/philippines/feed'),
|
||||||
@ -71,6 +71,7 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Global Nation - Europe', 'http://globalnation.inquirer.net/category/news/europe/feed'),
|
('Global Nation - Europe', 'http://globalnation.inquirer.net/category/news/europe/feed'),
|
||||||
('Global Nation - Global Pinoy', 'http://globalnation.inquirer.net/category/global-pinoy/feed'),
|
('Global Nation - Global Pinoy', 'http://globalnation.inquirer.net/category/global-pinoy/feed'),
|
||||||
('Global Nation - Events', 'http://globalnation.inquirer.net/category/events/feed'),
|
('Global Nation - Events', 'http://globalnation.inquirer.net/category/events/feed'),
|
||||||
|
|
||||||
('Business', 'http://business.inquirer.net/feed'),
|
('Business', 'http://business.inquirer.net/feed'),
|
||||||
('Business - Latest Stories', 'http://business.inquirer.net/category/latest-stories/feed'),
|
('Business - Latest Stories', 'http://business.inquirer.net/category/latest-stories/feed'),
|
||||||
('Business - Money', 'http://business.inquirer.net/category/money/feed'),
|
('Business - Money', 'http://business.inquirer.net/category/money/feed'),
|
||||||
@ -78,6 +79,7 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Business - Motoring', 'http://business.inquirer.net/category/motoring/feed'),
|
('Business - Motoring', 'http://business.inquirer.net/category/motoring/feed'),
|
||||||
('Business - Property Guide', 'http://business.inquirer.net/category/property-guide/feed'),
|
('Business - Property Guide', 'http://business.inquirer.net/category/property-guide/feed'),
|
||||||
('Business - Columnists', 'http://business.inquirer.net/category/columnists/feed'),
|
('Business - Columnists', 'http://business.inquirer.net/category/columnists/feed'),
|
||||||
|
|
||||||
('Sports', 'http://sports.inquirer.net/feed'),
|
('Sports', 'http://sports.inquirer.net/feed'),
|
||||||
('Sports - Latest Stories', 'http://sports.inquirer.net/category/latest-stories/feed'),
|
('Sports - Latest Stories', 'http://sports.inquirer.net/category/latest-stories/feed'),
|
||||||
('Sports - Basketball', 'http://sports.inquirer.net/category/section/basketball/feed'),
|
('Sports - Basketball', 'http://sports.inquirer.net/category/section/basketball/feed'),
|
||||||
@ -85,12 +87,15 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Sports - Golf', 'http://sports.inquirer.net/category/section/golf/feed'),
|
('Sports - Golf', 'http://sports.inquirer.net/category/section/golf/feed'),
|
||||||
('Sports - Football', 'http://sports.inquirer.net/category/section/other-sports/football/feed'),
|
('Sports - Football', 'http://sports.inquirer.net/category/section/other-sports/football/feed'),
|
||||||
('Sports - Other Sports', 'http://sports.inquirer.net/category/section/other-sports/feed'),
|
('Sports - Other Sports', 'http://sports.inquirer.net/category/section/other-sports/feed'),
|
||||||
|
|
||||||
('Technology', 'http://technology.inquirer.net/feed'),
|
('Technology', 'http://technology.inquirer.net/feed'),
|
||||||
('Technology Latest Stories', 'http://technology.inquirer.net/category/latest-stories/feed'),
|
('Technology Latest Stories', 'http://technology.inquirer.net/category/latest-stories/feed'),
|
||||||
|
|
||||||
('Entertainment', 'http://entertainment.inquirer.net/feed'),
|
('Entertainment', 'http://entertainment.inquirer.net/feed'),
|
||||||
('Entertainment - Headlines', 'http://entertainment.inquirer.net/category/headlines/feed'),
|
('Entertainment - Headlines', 'http://entertainment.inquirer.net/category/headlines/feed'),
|
||||||
('Entertainment - Latest Stories', 'http://entertainment.inquirer.net/category/latest-stories/feed'),
|
('Entertainment - Latest Stories', 'http://entertainment.inquirer.net/category/latest-stories/feed'),
|
||||||
('Entertainment - Movies', 'http://movies.inquirer.net/feed'),
|
('Entertainment - Movies', 'http://movies.inquirer.net/feed'),
|
||||||
|
|
||||||
('Lifestyle', 'http://lifestyle.inquirer.net/feed'),
|
('Lifestyle', 'http://lifestyle.inquirer.net/feed'),
|
||||||
('Lifestyle - Latest Stories', 'http://lifestyle.inquirer.net/category/latest-stories/feed'),
|
('Lifestyle - Latest Stories', 'http://lifestyle.inquirer.net/category/latest-stories/feed'),
|
||||||
('Lifestyle - Arts & Books', 'http://lifestyle.inquirer.net/category/arts-and-books/feed'),
|
('Lifestyle - Arts & Books', 'http://lifestyle.inquirer.net/category/arts-and-books/feed'),
|
||||||
@ -105,12 +110,14 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Lifestyle - Wedding', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/wedding/feed'),
|
('Lifestyle - Wedding', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/wedding/feed'),
|
||||||
('Lifestyle - Travel', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/travel/feed'),
|
('Lifestyle - Travel', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/travel/feed'),
|
||||||
('Lifestyle - Relationship', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/relationship/feed'),
|
('Lifestyle - Relationship', 'http://lifestyle.inquirer.net/category/sunday-lifestyle/relationship/feed'),
|
||||||
|
|
||||||
('Opinion', 'http://opinion.inquirer.net/feed'),
|
('Opinion', 'http://opinion.inquirer.net/feed'),
|
||||||
('Opinion - Viewpoints', 'http://opinion.inquirer.net/category/viewpoints/feed'),
|
('Opinion - Viewpoints', 'http://opinion.inquirer.net/category/viewpoints/feed'),
|
||||||
('Opinion - Talk of the Town', 'http://opinion.inquirer.net/category/inquirer-opinion/talk-of-the-town/feed'),
|
('Opinion - Talk of the Town', 'http://opinion.inquirer.net/category/inquirer-opinion/talk-of-the-town/feed'),
|
||||||
('Editorial', 'http://opinion.inquirer.net/category/editorial/feed'),
|
('Editorial', 'http://opinion.inquirer.net/category/editorial/feed'),
|
||||||
('Letters to the Editor', 'http://opinion.inquirer.net/category/letters-to-the-editor/feed'),
|
('Letters to the Editor', 'http://opinion.inquirer.net/category/letters-to-the-editor/feed'),
|
||||||
('Columns', 'http://opinion.inquirer.net/category/columns/feed'),
|
('Columns', 'http://opinion.inquirer.net/category/columns/feed'),
|
||||||
|
|
||||||
('Citizens Journalism', 'http://newsinfo.inquirer.net/category/citizens-journalism/feed'),
|
('Citizens Journalism', 'http://newsinfo.inquirer.net/category/citizens-journalism/feed'),
|
||||||
('Cebu - Daily News', 'http://newsinfo.inquirer.net/category/cdn/feed'),
|
('Cebu - Daily News', 'http://newsinfo.inquirer.net/category/cdn/feed'),
|
||||||
('Cebu - More News', 'http://newsinfo.inquirer.net/category/cdn/cdn-news/feed'),
|
('Cebu - More News', 'http://newsinfo.inquirer.net/category/cdn/cdn-news/feed'),
|
||||||
@ -119,5 +126,5 @@ class PhilippineDailyInquirer(BasicNewsRecipe):
|
|||||||
('Cebu - Business', 'http://newsinfo.inquirer.net/category/cdn/cdn-enterprise/feed'),
|
('Cebu - Business', 'http://newsinfo.inquirer.net/category/cdn/cdn-enterprise/feed'),
|
||||||
('Cebu - Sports', 'http://newsinfo.inquirer.net/category/cdn/cdn-sports/feed'),
|
('Cebu - Sports', 'http://newsinfo.inquirer.net/category/cdn/cdn-sports/feed'),
|
||||||
('Cebu - Visayas', 'http://newsinfo.inquirer.net/category/cdn/cdn-visayas/feed'),
|
('Cebu - Visayas', 'http://newsinfo.inquirer.net/category/cdn/cdn-visayas/feed'),
|
||||||
('Cebu - Opinion' , 'http://newsinfo.inquirer.net/category/cdn/cdn-opinion/feed')
|
('Cebu - Opinion', 'http://newsinfo.inquirer.net/category/cdn/cdn-opinion/feed'),
|
||||||
]
|
]
|
||||||
|
@ -227,7 +227,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -215,7 +215,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
|
|
||||||
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
pgall = soup.find('div', attrs={'id': 'storyphoto'})
|
||||||
if pgall is not None: # photo gallery perhaps
|
if pgall is not None: # photo gallery perhaps
|
||||||
|
@ -57,7 +57,7 @@ class CanWestPaper(BasicNewsRecipe):
|
|||||||
divtags = soup.findAll('div', attrs={'id': ''})
|
divtags = soup.findAll('div', attrs={'id': ''})
|
||||||
if divtags:
|
if divtags:
|
||||||
for div in divtags:
|
for div in divtags:
|
||||||
del (div['id'])
|
del div['id']
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
|
@ -26,7 +26,8 @@ class ANDROID(USBMS):
|
|||||||
|
|
||||||
VENDOR_ID = {
|
VENDOR_ID = {
|
||||||
# HTC
|
# HTC
|
||||||
0x0bb4 : {0xc02 : HTC_BCDS,
|
0x0bb4: {
|
||||||
|
0xc02 : HTC_BCDS,
|
||||||
0xc01 : HTC_BCDS,
|
0xc01 : HTC_BCDS,
|
||||||
0xff9 : HTC_BCDS,
|
0xff9 : HTC_BCDS,
|
||||||
0xc86 : HTC_BCDS,
|
0xc86 : HTC_BCDS,
|
||||||
@ -119,7 +120,8 @@ class ANDROID(USBMS):
|
|||||||
},
|
},
|
||||||
|
|
||||||
# Samsung
|
# Samsung
|
||||||
0x04e8 : {0x681d : [0x0222, 0x0223, 0x0224, 0x0400],
|
0x04e8: {
|
||||||
|
0x681d: [0x0222, 0x0223, 0x0224, 0x0400],
|
||||||
0x681c: [0x0222, 0x0223, 0x0224, 0x0400],
|
0x681c: [0x0222, 0x0223, 0x0224, 0x0400],
|
||||||
0x6640: [0x0100],
|
0x6640: [0x0100],
|
||||||
0x685b: [0x0400, 0x0226],
|
0x685b: [0x0400, 0x0226],
|
||||||
@ -178,7 +180,7 @@ class ANDROID(USBMS):
|
|||||||
# 0x45e : { 0x00e1 : [0x007], },
|
# 0x45e : { 0x00e1 : [0x007], },
|
||||||
|
|
||||||
# T-Mobile
|
# T-Mobile
|
||||||
0x0408 : {0x03ba : [0x0109], },
|
0x0408: {0x03ba: [0x0109]},
|
||||||
|
|
||||||
# Xperia
|
# Xperia
|
||||||
0x13d3: {0x3304: [0x0001, 0x0002]},
|
0x13d3: {0x3304: [0x0001, 0x0002]},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2010-2012, , Timothy Legge <timlegge at gmail.com> and David Forrester <davidfor@internode.on.net>'
|
__copyright__ = '2010-2012, Timothy Legge <timlegge at gmail.com> and David Forrester <davidfor@internode.on.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -1247,8 +1247,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
{'location_code': 'main', 'name':name})
|
{'location_code': 'main', 'name':name})
|
||||||
|
|
||||||
@synchronous('sync_lock')
|
@synchronous('sync_lock')
|
||||||
def reset(self, key='-1', log_packets=False, report_progress=None,
|
def reset(self, key='-1', log_packets=False, report_progress=None, detected_device=None):
|
||||||
detected_device=None) :
|
|
||||||
self._debug()
|
self._debug()
|
||||||
self.set_progress_reporter(report_progress)
|
self.set_progress_reporter(report_progress)
|
||||||
|
|
||||||
|
@ -49,12 +49,14 @@ class SNBInput(InputFormatPlugin):
|
|||||||
meta = snbFile.GetFileStream('snbf/book.snbf')
|
meta = snbFile.GetFileStream('snbf/book.snbf')
|
||||||
if meta is not None:
|
if meta is not None:
|
||||||
meta = safe_xml_fromstring(meta)
|
meta = safe_xml_fromstring(meta)
|
||||||
l = {'title' : './/head/name',
|
l = {
|
||||||
|
'title' : './/head/name',
|
||||||
'creator' : './/head/author',
|
'creator' : './/head/author',
|
||||||
'language' : './/head/language',
|
'language' : './/head/language',
|
||||||
'generator': './/head/generator',
|
'generator': './/head/generator',
|
||||||
'publisher': './/head/publisher',
|
'publisher': './/head/publisher',
|
||||||
'cover' : './/head/cover', }
|
'cover' : './/head/cover',
|
||||||
|
}
|
||||||
d = {}
|
d = {}
|
||||||
for item in l:
|
for item in l:
|
||||||
node = meta.find(l[item])
|
node = meta.find(l[item])
|
||||||
|
@ -109,7 +109,7 @@ class DJVUFile:
|
|||||||
def __init__(self, instream, verbose=0):
|
def __init__(self, instream, verbose=0):
|
||||||
self.instream = instream
|
self.instream = instream
|
||||||
buf = self.instream.read(4)
|
buf = self.instream.read(4)
|
||||||
assert (buf == b'AT&T')
|
assert buf == b'AT&T'
|
||||||
buf = self.instream.read()
|
buf = self.instream.read()
|
||||||
self.dc = DjvuChunk(buf, 0, len(buf), verbose=verbose)
|
self.dc = DjvuChunk(buf, 0, len(buf), verbose=verbose)
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ class BZZDecoder:
|
|||||||
# Create machine independent ffz table
|
# Create machine independent ffz table
|
||||||
for i in range(256):
|
for i in range(256):
|
||||||
j = i
|
j = i
|
||||||
while (j & 0x80):
|
while j & 0x80:
|
||||||
self.ffzt[i] += 1
|
self.ffzt[i] += 1
|
||||||
j <<= 1
|
j <<= 1
|
||||||
# Initialize table
|
# Initialize table
|
||||||
|
@ -15,7 +15,7 @@ import sys
|
|||||||
|
|
||||||
from . import open_for_read, open_for_write
|
from . import open_for_read, open_for_write
|
||||||
|
|
||||||
# , codecs
|
# codecs
|
||||||
|
|
||||||
|
|
||||||
class Output:
|
class Output:
|
||||||
|
@ -238,8 +238,7 @@ cw<ci<font-style<nu<0
|
|||||||
'mi<mk<fonttb-end\n' + 'mi<tg<close_____<font-table\n'
|
'mi<mk<fonttb-end\n' + 'mi<tg<close_____<font-table\n'
|
||||||
elif self.__token_info == 'ob<nu<open-brack':
|
elif self.__token_info == 'ob<nu<open-brack':
|
||||||
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
||||||
self.__font_table_final += \
|
self.__font_table_final += 'mi<mk<fontit-beg\n'
|
||||||
'mi<mk<fontit-beg\n'
|
|
||||||
self.__individual_font = 1
|
self.__individual_font = 1
|
||||||
else:
|
else:
|
||||||
# ignore
|
# ignore
|
||||||
@ -249,8 +248,7 @@ cw<ci<font-style<nu<0
|
|||||||
elif self.__token_info == 'cb<nu<clos-brack':
|
elif self.__token_info == 'cb<nu<clos-brack':
|
||||||
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
||||||
self.__individual_font = 0
|
self.__individual_font = 0
|
||||||
self.__font_table_final += \
|
self.__font_table_final += 'mi<mk<fontit-end\n'
|
||||||
'mi<mk<fontit-end\n'
|
|
||||||
elif self.__individual_font:
|
elif self.__individual_font:
|
||||||
if self.__old_font and self.__token_info == 'tx<nu<__________':
|
if self.__old_font and self.__token_info == 'tx<nu<__________':
|
||||||
if ';' in line:
|
if ';' in line:
|
||||||
@ -316,12 +314,10 @@ cw<ci<font-style<nu<0
|
|||||||
'mi<mk<styles-end\n' + 'mi<tg<close_____<style-table\n'
|
'mi<mk<styles-end\n' + 'mi<tg<close_____<style-table\n'
|
||||||
elif self.__token_info == 'ob<nu<open-brack':
|
elif self.__token_info == 'ob<nu<open-brack':
|
||||||
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
||||||
self.__style_sheet_final += \
|
self.__style_sheet_final += 'mi<mk<stylei-beg\n'
|
||||||
'mi<mk<stylei-beg\n'
|
|
||||||
elif self.__token_info == 'cb<nu<clos-brack':
|
elif self.__token_info == 'cb<nu<clos-brack':
|
||||||
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
||||||
self.__style_sheet_final += \
|
self.__style_sheet_final += 'mi<mk<stylei-end\n'
|
||||||
'mi<mk<stylei-end\n'
|
|
||||||
else:
|
else:
|
||||||
self.__style_sheet_final += line
|
self.__style_sheet_final += line
|
||||||
|
|
||||||
@ -395,12 +391,10 @@ cw<ci<font-style<nu<0
|
|||||||
'mi<mk<doc-in-end\n' + 'mi<tg<close_____<doc-information\n'
|
'mi<mk<doc-in-end\n' + 'mi<tg<close_____<doc-information\n'
|
||||||
elif self.__token_info == 'ob<nu<open-brack':
|
elif self.__token_info == 'ob<nu<open-brack':
|
||||||
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
if int(self.__ob_count) == int(self.__close_group_count) + 1:
|
||||||
self.__doc_info_table_final += \
|
self.__doc_info_table_final += 'mi<mk<docinf-beg\n'
|
||||||
'mi<mk<docinf-beg\n'
|
|
||||||
elif self.__token_info == 'cb<nu<clos-brack':
|
elif self.__token_info == 'cb<nu<clos-brack':
|
||||||
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
if int(self.__cb_count) == int(self.__close_group_count) + 1:
|
||||||
self.__doc_info_table_final += \
|
self.__doc_info_table_final += 'mi<mk<docinf-end\n'
|
||||||
'mi<mk<docinf-end\n'
|
|
||||||
else:
|
else:
|
||||||
self.__doc_info_table_final += line
|
self.__doc_info_table_final += line
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ def toolbar_widgets_for_action(gui, action):
|
|||||||
# The button might be hidden
|
# The button might be hidden
|
||||||
if not w.isVisible():
|
if not w.isVisible():
|
||||||
continue
|
continue
|
||||||
yield (w)
|
yield w
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -725,7 +725,7 @@ class PluginWidget(QWidget,Ui_Form):
|
|||||||
self.preset_field.setCurrentIndex(0)
|
self.preset_field.setCurrentIndex(0)
|
||||||
|
|
||||||
if item_name in self.presets.keys():
|
if item_name in self.presets.keys():
|
||||||
del (self.presets[item_name])
|
del self.presets[item_name]
|
||||||
self.presets.commit()
|
self.presets.commit()
|
||||||
|
|
||||||
def preset_save(self):
|
def preset_save(self):
|
||||||
|
@ -56,7 +56,7 @@ class Query:
|
|||||||
query_string[name] = [getattr(self, macro)]
|
query_string[name] = [getattr(self, macro)]
|
||||||
else:
|
else:
|
||||||
# remove the name/value pair
|
# remove the name/value pair
|
||||||
del (query_string[name])
|
del query_string[name]
|
||||||
|
|
||||||
# copy the url parts and substitute in our new query string
|
# copy the url parts and substitute in our new query string
|
||||||
url_parts = list(self.url_parts)
|
url_parts = list(self.url_parts)
|
||||||
|
@ -299,7 +299,7 @@ class Element(Node):
|
|||||||
def __init__(self, attributes=None, text=None, cdata=None, qname=None, qattributes=None, check_grammar=True, **args):
|
def __init__(self, attributes=None, text=None, cdata=None, qname=None, qattributes=None, check_grammar=True, **args):
|
||||||
if qname is not None:
|
if qname is not None:
|
||||||
self.qname = qname
|
self.qname = qname
|
||||||
assert (hasattr(self, 'qname'))
|
assert hasattr(self, 'qname')
|
||||||
self.ownerDocument = None
|
self.ownerDocument = None
|
||||||
self.childNodes=[]
|
self.childNodes=[]
|
||||||
self.allowed_children = grammar.allowed_children.get(self.qname)
|
self.allowed_children = grammar.allowed_children.get(self.qname)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user