diff --git a/recipes/ambito_financiero.recipe b/recipes/ambito_financiero.recipe index 08c056e8ee..c45fa8fbce 100644 --- a/recipes/ambito_financiero.recipe +++ b/recipes/ambito_financiero.recipe @@ -42,7 +42,7 @@ class Ambito_Financiero(BasicNewsRecipe): remove_attributes = ['align'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) if self.username is not None and self.password is not None: br.open(self.LOGIN) diff --git a/recipes/apple_daily.recipe b/recipes/apple_daily.recipe index 1e9953af43..763136c9b0 100644 --- a/recipes/apple_daily.recipe +++ b/recipes/apple_daily.recipe @@ -37,7 +37,7 @@ class AppleDaily(BasicNewsRecipe): #def get_browser(self): - #br = BasicNewsRecipe.get_browser() + #br = BasicNewsRecipe.get_browser(self) #if self.username is not None and self.password is not None: # br.open('http://www.nytimes.com/auth/login') # br.select_form(name='login') diff --git a/recipes/archeowiesci.recipe b/recipes/archeowiesci.recipe index e121ba4d42..6bcc9bef6c 100644 --- a/recipes/archeowiesci.recipe +++ b/recipes/archeowiesci.recipe @@ -22,7 +22,7 @@ class Archeowiesci(BasicNewsRecipe): return feeds def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://archeowiesci.pl/wp-login.php') br.select_form(name='loginform') diff --git a/recipes/azstarnet.recipe b/recipes/azstarnet.recipe index 45339ae208..3ab10a9b6f 100644 --- a/recipes/azstarnet.recipe +++ b/recipes/azstarnet.recipe @@ -31,7 +31,7 @@ class Azstarnet(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://azstarnet.com/') if self.username is not None and self.password is not None: data = urllib.urlencode({ 'm':'login' diff --git a/recipes/big_oven.recipe b/recipes/big_oven.recipe index ba3a5dec38..a1e9a5c042 100644 --- a/recipes/big_oven.recipe +++ b/recipes/big_oven.recipe @@ -25,7 +25,7 @@ class BigOven(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.bigoven.com/account/login?ReturnUrl=/') br.select_form(nr=1) diff --git a/recipes/brecha.recipe b/recipes/brecha.recipe index da58710dd5..3eef48379f 100644 --- a/recipes/brecha.recipe +++ b/recipes/brecha.recipe @@ -40,7 +40,7 @@ class Brecha(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.brecha.com.uy/index.php/acceder-miembros') if self.username is not None and self.password is not None: data = urllib.urlencode({ 'task':'login' diff --git a/recipes/cacm.recipe b/recipes/cacm.recipe index e4af9d2024..a7b1c602a3 100644 --- a/recipes/cacm.recipe +++ b/recipes/cacm.recipe @@ -17,7 +17,7 @@ class AdvancedUserRecipe1286242553(BasicNewsRecipe): cover_url_pattern = 'http://cacm.acm.org/magazines/%d/%d' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://cacm.acm.org/login') br.select_form(nr=1) diff --git a/recipes/caijing.recipe b/recipes/caijing.recipe index 34e6c1e8a9..05bc9314b3 100644 --- a/recipes/caijing.recipe +++ b/recipes/caijing.recipe @@ -34,7 +34,7 @@ class Caijing(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://service.caijing.com.cn/usermanage/login') br.select_form(name='mainLoginForm') diff --git a/recipes/calgary_herald.recipe b/recipes/calgary_herald.recipe index d1b28de9de..f7b1ee71d5 100644 --- a/recipes/calgary_herald.recipe +++ b/recipes/calgary_herald.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/chronicle_higher_ed.recipe b/recipes/chronicle_higher_ed.recipe index 66b17cafcf..cac0cf77da 100644 --- a/recipes/chronicle_higher_ed.recipe +++ b/recipes/chronicle_higher_ed.recipe @@ -23,7 +23,7 @@ class Chronicle(BasicNewsRecipe): needs_subscription = True def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://chronicle.com/myaccount/login') br.select_form(nr=1) diff --git a/recipes/cnn.recipe b/recipes/cnn.recipe index 6043f8b401..3cb66d2967 100644 --- a/recipes/cnn.recipe +++ b/recipes/cnn.recipe @@ -73,7 +73,7 @@ class CNN(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/intl/hdr-globe-central.gif' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/corriere_della_sera_it.recipe b/recipes/corriere_della_sera_it.recipe index b3bcebf505..01d8dbe720 100644 --- a/recipes/corriere_della_sera_it.recipe +++ b/recipes/corriere_della_sera_it.recipe @@ -62,7 +62,7 @@ class ilCorriere(BasicNewsRecipe): day = "%.2d" % st.tm_mday #http://images.corriere.it/primapagina/storico/2010_05_17/images/prima_pagina_grande.png cover='http://images.corriere.it/primapagina/storico/'+ year + '_' + month +'_' + day +'/images/prima_pagina_grande.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/dani.recipe b/recipes/dani.recipe index d11eecfeb9..740d5c2381 100644 --- a/recipes/dani.recipe +++ b/recipes/dani.recipe @@ -40,7 +40,7 @@ class BHDani(BasicNewsRecipe): remove_attributes = ['height','width','align'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.INDEX) br.select_form(name='form') diff --git a/recipes/der_spiegel.recipe b/recipes/der_spiegel.recipe index 3a12378405..9ea4be6201 100644 --- a/recipes/der_spiegel.recipe +++ b/recipes/der_spiegel.recipe @@ -42,7 +42,7 @@ class DerSpiegel(BasicNewsRecipe): else: return True - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.PREFIX + '/meinspiegel/login.html') br.select_form(predicate=has_login_name) diff --git a/recipes/dziennik_polski.recipe b/recipes/dziennik_polski.recipe index 83b9d06ecd..253bda2ebe 100644 --- a/recipes/dziennik_polski.recipe +++ b/recipes/dziennik_polski.recipe @@ -116,7 +116,7 @@ class DziennikPolski24(BasicNewsRecipe): loop=True def get_browser(self): - br=BasicNewsRecipe.get_browser() + br=BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.dziennikpolski24.pl/pl/moje-konto/950606-loguj.html') br.select_form(nr = 1) diff --git a/recipes/economist.recipe b/recipes/economist.recipe index 9c0b08c744..d7af32a243 100644 --- a/recipes/economist.recipe +++ b/recipes/economist.recipe @@ -57,7 +57,7 @@ class Economist(BasicNewsRecipe): needs_subscription = False ''' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username and self.password: br.open('http://www.economist.com/user/login') br.select_form(nr=1) diff --git a/recipes/economist_free.recipe b/recipes/economist_free.recipe index 9c0b08c744..d7af32a243 100644 --- a/recipes/economist_free.recipe +++ b/recipes/economist_free.recipe @@ -57,7 +57,7 @@ class Economist(BasicNewsRecipe): needs_subscription = False ''' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username and self.password: br.open('http://www.economist.com/user/login') br.select_form(nr=1) diff --git a/recipes/edmonton_journal.recipe b/recipes/edmonton_journal.recipe index d3fdbc84f3..33d42d198e 100644 --- a/recipes/edmonton_journal.recipe +++ b/recipes/edmonton_journal.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/el_correo.recipe b/recipes/el_correo.recipe index 9190560b02..110c19d7ba 100644 --- a/recipes/el_correo.recipe +++ b/recipes/el_correo.recipe @@ -73,7 +73,7 @@ class heraldo(BasicNewsRecipe): #[url]http://info.elcorreo.com/pdf/06012011-viz.pdf[/url] cover='http://info.elcorreo.com/pdf/'+ day + month + year +'-viz.pdf' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/el_diplo.recipe b/recipes/el_diplo.recipe index 619e99e5cd..b9ef8268e1 100644 --- a/recipes/el_diplo.recipe +++ b/recipes/el_diplo.recipe @@ -44,7 +44,7 @@ class ElDiplo_Recipe(BasicNewsRecipe): img.save(tmp_cover.name) def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.eldiplo.org/index.php/login/-/do_login/index.html') br.select_form(nr=3) diff --git a/recipes/elet_es_irodalom.recipe b/recipes/elet_es_irodalom.recipe index 944096547e..ea259e27ad 100644 --- a/recipes/elet_es_irodalom.recipe +++ b/recipes/elet_es_irodalom.recipe @@ -26,7 +26,7 @@ class elet_es_irodalom(BasicNewsRecipe): #Nem ide a kódba kell beleírni a hozzáférés adatait, hanem azt akkor adod meg, ha le akarod tölteni! def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.es.hu/') br.select_form(name='userfrmlogin') diff --git a/recipes/elmundo.recipe b/recipes/elmundo.recipe index 4f04f68575..c38f941ef2 100644 --- a/recipes/elmundo.recipe +++ b/recipes/elmundo.recipe @@ -116,7 +116,7 @@ class ElMundo(BasicNewsRecipe): day = "%.2d" % st.tm_mday #http://img.kiosko.net/2011/11/19/es/elmundo.750.jpg cover='http://img.kiosko.net/'+ year + '/' + month + '/' + day +'/es/elmundo.750.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/espn.recipe b/recipes/espn.recipe index 03c95d0001..253d9c0dc1 100644 --- a/recipes/espn.recipe +++ b/recipes/espn.recipe @@ -76,7 +76,7 @@ class ESPN(BasicNewsRecipe): return soup def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username and self.password: br.set_handle_refresh(False) url = ('https://r.espn.go.com/members/v3_1/login') diff --git a/recipes/expansion_spanish.recipe b/recipes/expansion_spanish.recipe index 07a0c99761..476d744f78 100644 --- a/recipes/expansion_spanish.recipe +++ b/recipes/expansion_spanish.recipe @@ -89,7 +89,7 @@ class expansion_spanish(BasicNewsRecipe): day = "%.2d" % st.tm_mday #[url]http://img5.kiosko.net/2011/11/14/es/expansion.750.jpg[/url] cover='http://img5.kiosko.net/'+ year + '/' + month + '/' + day +'/es/expansion.750.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index 0079b2be3a..3588a19008 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -34,7 +34,7 @@ class FinancialTimes_rss(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) if self.username is not None and self.password is not None: br.open(self.LOGIN) diff --git a/recipes/financial_times_uk.recipe b/recipes/financial_times_uk.recipe index 6af000d990..f7a63fbb18 100644 --- a/recipes/financial_times_uk.recipe +++ b/recipes/financial_times_uk.recipe @@ -40,7 +40,7 @@ class FinancialTimes(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) if self.username is not None and self.password is not None: br.open(self.LOGIN2) diff --git a/recipes/folhadesaopaulo_sub.recipe b/recipes/folhadesaopaulo_sub.recipe index cd444b4682..238310edc1 100644 --- a/recipes/folhadesaopaulo_sub.recipe +++ b/recipes/folhadesaopaulo_sub.recipe @@ -40,7 +40,7 @@ class FSP(BasicNewsRecipe): re.DOTALL|re.IGNORECASE), lambda match: r'')] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://acesso.uol.com.br/login.html') br.form = br.forms().next() diff --git a/recipes/foreignaffairs.recipe b/recipes/foreignaffairs.recipe index b383609860..370f6d53e3 100644 --- a/recipes/foreignaffairs.recipe +++ b/recipes/foreignaffairs.recipe @@ -132,7 +132,7 @@ class ForeignAffairsRecipe(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://www.foreignaffairs.com/user?destination=user%3Fop%3Dlo') br.select_form(nr = 1) diff --git a/recipes/haaretz_en.recipe b/recipes/haaretz_en.recipe index ade32ae5ea..0856621d38 100644 --- a/recipes/haaretz_en.recipe +++ b/recipes/haaretz_en.recipe @@ -65,7 +65,7 @@ class Haaretz_en(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.PREFIX) if self.username is not None and self.password is not None: data = urllib.urlencode({ 'cb':'parseEngReply' diff --git a/recipes/harpers_full.recipe b/recipes/harpers_full.recipe index 153f82db7b..a63f828968 100644 --- a/recipes/harpers_full.recipe +++ b/recipes/harpers_full.recipe @@ -51,7 +51,7 @@ class Harpers_full(BasicNewsRecipe): remove_attributes=['xmlns'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://harpers.org/') if self.username is not None and self.password is not None: tt = time.localtime()*1000 diff --git a/recipes/heraldo.recipe b/recipes/heraldo.recipe index b00d3f23c8..aa1a6cf1ee 100644 --- a/recipes/heraldo.recipe +++ b/recipes/heraldo.recipe @@ -53,7 +53,7 @@ class heraldo(BasicNewsRecipe): day = "%.2d" % st.tm_mday #[url]http://oldorigin-www.heraldo.es/20101211/primeras/portada_aragon.pdf[/url] cover='http://oldorigin-www.heraldo.es/'+ year + month + day +'/primeras/portada_aragon.pdf' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/history_today.recipe b/recipes/history_today.recipe index 43adf7a358..9f88976b66 100644 --- a/recipes/history_today.recipe +++ b/recipes/history_today.recipe @@ -21,7 +21,7 @@ class HistoryToday(BasicNewsRecipe): needs_subscription = True def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.historytoday.com/user/login') br.select_form(nr=1) diff --git a/recipes/il_messaggero.recipe b/recipes/il_messaggero.recipe index f0983f438c..02310ff9af 100644 --- a/recipes/il_messaggero.recipe +++ b/recipes/il_messaggero.recipe @@ -44,7 +44,7 @@ class IlMessaggero(BasicNewsRecipe): month = "%.2d" % st.tm_mon day = "%.2d" % st.tm_mday cover='http://carta.ilmessaggero.it/' + year + month + day + '/jpeg/MSGR_20_CITTA_1.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/insider.recipe b/recipes/insider.recipe index faaf00a14a..2b9bb0f67c 100644 --- a/recipes/insider.recipe +++ b/recipes/insider.recipe @@ -21,7 +21,7 @@ class insider(BasicNewsRecipe): needs_subscription = True def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.denikinsider.cz/') br.select_form(nr=0) br['login-name'] = self.username diff --git a/recipes/instapaper.recipe b/recipes/instapaper.recipe index 4481866550..ef7f72ce1e 100644 --- a/recipes/instapaper.recipe +++ b/recipes/instapaper.recipe @@ -37,7 +37,7 @@ class AdvancedUserRecipe1299694372(BasicNewsRecipe): add_title_tag = False; def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None: br.open(self.LOGIN) br.select_form(nr=0) diff --git a/recipes/jbpress.recipe b/recipes/jbpress.recipe index 1048f1fc9a..87d83a775f 100644 --- a/recipes/jbpress.recipe +++ b/recipes/jbpress.recipe @@ -25,7 +25,7 @@ class JBPress(BasicNewsRecipe): ''' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://jbpress.ismedia.jp/articles/print/5549') response = br.response() diff --git a/recipes/johm.recipe b/recipes/johm.recipe index 0f5625b806..5c3346c71f 100644 --- a/recipes/johm.recipe +++ b/recipes/johm.recipe @@ -17,7 +17,7 @@ class JournalofHospitalMedicine(BasicNewsRecipe): # TO LOGIN def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www3.interscience.wiley.com/cgi-bin/home') br.select_form(nr=0) br['j_username'] = self.username diff --git a/recipes/kidney.recipe b/recipes/kidney.recipe index 19fd244675..ac4cc5d7f4 100644 --- a/recipes/kidney.recipe +++ b/recipes/kidney.recipe @@ -31,7 +31,7 @@ class JASN(BasicNewsRecipe): #TO LOGIN def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) self.kidney_toc_soup = BeautifulSoup(br.open(self.INDEX).read()) toc = self.kidney_toc_soup.find(id='tocTable') t = toc.find(text=lambda x: x and '[Full Text]' in x) diff --git a/recipes/klip_me.recipe b/recipes/klip_me.recipe index 71918dc78b..cef6b1b467 100644 --- a/recipes/klip_me.recipe +++ b/recipes/klip_me.recipe @@ -29,7 +29,7 @@ class AdvancedUserRecipe1299694372(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None: br.open(self.LOGIN) br.select_form(nr=0) diff --git a/recipes/korben.recipe b/recipes/korben.recipe index fb8134b5cb..620838613f 100644 --- a/recipes/korben.recipe +++ b/recipes/korben.recipe @@ -11,7 +11,7 @@ class BasicUserRecipe1318619728(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://korben.info/wp-content/themes/korben-steaw/hab/logo.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/le_monde_sub.recipe b/recipes/le_monde_sub.recipe index 6f5c16e3d1..8da4a97627 100644 --- a/recipes/le_monde_sub.recipe +++ b/recipes/le_monde_sub.recipe @@ -47,7 +47,7 @@ class LeMondeAbonne(BasicNewsRecipe): article_url_format = 'http://www.lemonde.fr/journalelectronique/donnees/protege/%Y%m%d/html/' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.login_url) br.select_form(nr=0) diff --git a/recipes/ledevoir.recipe b/recipes/ledevoir.recipe index d99ca53841..f79c010804 100644 --- a/recipes/ledevoir.recipe +++ b/recipes/ledevoir.recipe @@ -88,7 +88,7 @@ class ledevoir(BasicNewsRecipe): .texte {font-size:1.15em;line-height:1.4em;margin-bottom:17px;} ''' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.ledevoir.com') br.select_form(nr=0) diff --git a/recipes/leggo_it.recipe b/recipes/leggo_it.recipe index 13b2ca9018..32d9f0f6d7 100644 --- a/recipes/leggo_it.recipe +++ b/recipes/leggo_it.recipe @@ -53,12 +53,12 @@ class LeggoIT(BasicNewsRecipe): month = "%.2d" % st.tm_mon day = "%.2d" % st.tm_mday cover='http://www.leggo.it/'+ year + month + day + '/jpeg/LEGGO_ROMA_1.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: cover='http://www.leggo.it/'+ year + month + day + '/jpeg/LEGGO_ROMA_3.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/lemonde_dip.recipe b/recipes/lemonde_dip.recipe index 8e61e24cdc..ab2e123e58 100644 --- a/recipes/lemonde_dip.recipe +++ b/recipes/lemonde_dip.recipe @@ -42,7 +42,7 @@ class LeMondeDiplomatiqueEn(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.LOGIN) if self.username is not None and self.password is not None: data = urllib.urlencode({ 'login':self.username diff --git a/recipes/lepoint.recipe b/recipes/lepoint.recipe index 9a4aab01da..78fbe951cd 100644 --- a/recipes/lepoint.recipe +++ b/recipes/lepoint.recipe @@ -66,7 +66,7 @@ class lepoint(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://www.lepoint.fr/images/commun/logo.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/lexpress.recipe b/recipes/lexpress.recipe index 3de6226f1b..fef8dc9f96 100644 --- a/recipes/lexpress.recipe +++ b/recipes/lexpress.recipe @@ -64,7 +64,7 @@ class lepoint(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://static.lexpress.fr/imgstat/logo_lexpress.gif' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/liberation.recipe b/recipes/liberation.recipe index 7183e26909..741e2e87d2 100644 --- a/recipes/liberation.recipe +++ b/recipes/liberation.recipe @@ -71,7 +71,7 @@ class Liberation(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://s0.libe.com/libe/img/common/logo-liberation-150.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/liberation_sub.recipe b/recipes/liberation_sub.recipe index 3ea933f364..60450341e4 100644 --- a/recipes/liberation_sub.recipe +++ b/recipes/liberation_sub.recipe @@ -61,7 +61,7 @@ class Liberation(BasicNewsRecipe): index = 'http://www.liberation.fr/abonnes/' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.liberation.fr/jogger/login/') br.select_form(nr=0) diff --git a/recipes/lrb_payed.recipe b/recipes/lrb_payed.recipe index 320890110a..ad713e38f1 100644 --- a/recipes/lrb_payed.recipe +++ b/recipes/lrb_payed.recipe @@ -28,7 +28,7 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.LOGIN) br.select_form(nr=1) diff --git a/recipes/lwn.recipe b/recipes/lwn.recipe index e8f8132686..dcc79adfda 100644 --- a/recipes/lwn.recipe +++ b/recipes/lwn.recipe @@ -23,7 +23,7 @@ class LWN(BasicNewsRecipe): LOGIN = 'https://lwn.net/login' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.LOGIN) br.select_form(name='loginform') diff --git a/recipes/lwn_weekly.recipe b/recipes/lwn_weekly.recipe index 95994aa97e..9400b1bf10 100644 --- a/recipes/lwn_weekly.recipe +++ b/recipes/lwn_weekly.recipe @@ -43,7 +43,7 @@ class WeeklyLWN(BasicNewsRecipe): needs_subscription = 'optional' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://lwn.net/login') br.select_form(name='loginform') diff --git a/recipes/mediapart.recipe b/recipes/mediapart.recipe index f84fb5bc7e..f1e6c87385 100644 --- a/recipes/mediapart.recipe +++ b/recipes/mediapart.recipe @@ -44,7 +44,7 @@ class Mediapart(BasicNewsRecipe): # -- Handle login def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.mediapart.fr/') br.select_form(nr=0) diff --git a/recipes/medscape.recipe b/recipes/medscape.recipe index ef406c64dc..f05948a6e3 100644 --- a/recipes/medscape.recipe +++ b/recipes/medscape.recipe @@ -38,7 +38,7 @@ class MedScrape(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://profreg.medscape.com/px/getlogin.do') br.select_form(name='LoginForm') diff --git a/recipes/ming_pao.recipe b/recipes/ming_pao.recipe index 7866c89861..a655d598e4 100644 --- a/recipes/ming_pao.recipe +++ b/recipes/ming_pao.recipe @@ -252,7 +252,7 @@ class MPRecipe(BasicNewsRecipe): cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg' elif __Region__ == 'Toronto': cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/ming_pao_toronto.recipe b/recipes/ming_pao_toronto.recipe index 84001d3952..48aca5ee2c 100644 --- a/recipes/ming_pao_toronto.recipe +++ b/recipes/ming_pao_toronto.recipe @@ -229,7 +229,7 @@ class MPRecipe(BasicNewsRecipe): cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg' elif __Region__ == 'Toronto': cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/ming_pao_vancouver.recipe b/recipes/ming_pao_vancouver.recipe index 8dc2c78cb7..686dbd0bf7 100644 --- a/recipes/ming_pao_vancouver.recipe +++ b/recipes/ming_pao_vancouver.recipe @@ -229,7 +229,7 @@ class MPRecipe(BasicNewsRecipe): cover = 'http://www.mingpaovan.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgva1s.jpg' elif __Region__ == 'Toronto': cover = 'http://www.mingpaotor.com/ftp/News/' + self.get_fetchdate() + '/' + self.get_fetchday() + 'pgtas.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/montreal_gazette.recipe b/recipes/montreal_gazette.recipe index 49a5089b5c..66f951f62f 100644 --- a/recipes/montreal_gazette.recipe +++ b/recipes/montreal_gazette.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/nbonline.recipe b/recipes/nbonline.recipe index 82b7667a5c..ff8b0d16b2 100644 --- a/recipes/nbonline.recipe +++ b/recipes/nbonline.recipe @@ -18,7 +18,7 @@ class NBOnline(BasicNewsRecipe): return 'http://business.nikkeibp.co.jp/images/nbo/200804/parts/logo.gif' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://signon.nikkeibp.co.jp/front/login/?ct=p&ts=nbo') br.select_form(name='loginActionForm') diff --git a/recipes/nejm.recipe b/recipes/nejm.recipe index bc12fbcedf..9e6c4ceddc 100644 --- a/recipes/nejm.recipe +++ b/recipes/nejm.recipe @@ -16,7 +16,7 @@ class NYTimes(BasicNewsRecipe): #TO LOGIN def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.nejm.org/action/showLogin?uri=http://www.nejm.org/') br.select_form(name='frmLogin') br['login'] = self.username diff --git a/recipes/new_scientist.recipe b/recipes/new_scientist.recipe index 1bfe27685f..521a7ba0d8 100644 --- a/recipes/new_scientist.recipe +++ b/recipes/new_scientist.recipe @@ -68,7 +68,7 @@ class NewScientist(BasicNewsRecipe): url_list = [] # This list is used to check if an article had already been included. def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.newscientist.com/') if self.username is not None and self.password is not None: br.open('https://www.newscientist.com/user/login') diff --git a/recipes/new_york_review_of_books.recipe b/recipes/new_york_review_of_books.recipe index bff7421b43..2da9536da3 100644 --- a/recipes/new_york_review_of_books.recipe +++ b/recipes/new_york_review_of_books.recipe @@ -31,7 +31,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): m:'')] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.nybooks.com/account/signin/') br.select_form(nr = 1) br['username'] = self.username diff --git a/recipes/nikkei_news.recipe b/recipes/nikkei_news.recipe index 3260b8c168..9a974e9596 100644 --- a/recipes/nikkei_news.recipe +++ b/recipes/nikkei_news.recipe @@ -30,7 +30,7 @@ class NikkeiNet_paper_subscription(BasicNewsRecipe): remove_tags_after = {'class':"cmn-indent"} def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) #pp.pprint(self.parse_index()) #exit(1) diff --git a/recipes/nikkei_sub.recipe b/recipes/nikkei_sub.recipe index 18f324009a..cb76577fa1 100644 --- a/recipes/nikkei_sub.recipe +++ b/recipes/nikkei_sub.recipe @@ -25,7 +25,7 @@ class NikkeiNet_subscription(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_economy.recipe b/recipes/nikkei_sub_economy.recipe index 8e7a68dfe7..7a256f7553 100644 --- a/recipes/nikkei_sub_economy.recipe +++ b/recipes/nikkei_sub_economy.recipe @@ -44,7 +44,7 @@ class NikkeiNet_sub_economy(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_industry.recipe b/recipes/nikkei_sub_industry.recipe index 81e86767d0..11a17b2415 100644 --- a/recipes/nikkei_sub_industry.recipe +++ b/recipes/nikkei_sub_industry.recipe @@ -41,7 +41,7 @@ class NikkeiNet_sub_industory(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_life.recipe b/recipes/nikkei_sub_life.recipe index 60e5b170ca..c2b908ca98 100644 --- a/recipes/nikkei_sub_life.recipe +++ b/recipes/nikkei_sub_life.recipe @@ -38,7 +38,7 @@ class NikkeiNet_sub_life(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_main.recipe b/recipes/nikkei_sub_main.recipe index 485d2f32c0..84503cccf3 100644 --- a/recipes/nikkei_sub_main.recipe +++ b/recipes/nikkei_sub_main.recipe @@ -37,7 +37,7 @@ class NikkeiNet_sub_main(BasicNewsRecipe): feeds = [ (u'NIKKEI', u'http://www.zou3.net/php/rss/nikkei2rss.php?head=main')] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_shakai.recipe b/recipes/nikkei_sub_shakai.recipe index 9a53e910e6..be21b3c43f 100644 --- a/recipes/nikkei_sub_shakai.recipe +++ b/recipes/nikkei_sub_shakai.recipe @@ -36,7 +36,7 @@ class NikkeiNet_sub_shakai(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nikkei_sub_sports.recipe b/recipes/nikkei_sub_sports.recipe index 644b0aa252..47e335a4c3 100644 --- a/recipes/nikkei_sub_sports.recipe +++ b/recipes/nikkei_sub_sports.recipe @@ -42,7 +42,7 @@ class NikkeiNet_sub_sports(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) cj = mechanize.LWPCookieJar() br.set_cookiejar(cj) diff --git a/recipes/nin.recipe b/recipes/nin.recipe index 084c49ab2b..c6e54a2fe2 100644 --- a/recipes/nin.recipe +++ b/recipes/nin.recipe @@ -51,7 +51,7 @@ class Nin(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.INDEX) br.select_form(name='form1') diff --git a/recipes/novilist_novine_hr.recipe b/recipes/novilist_novine_hr.recipe index 4cd3e8277a..26d4eebe18 100644 --- a/recipes/novilist_novine_hr.recipe +++ b/recipes/novilist_novine_hr.recipe @@ -53,7 +53,7 @@ class NoviList_hr(BasicNewsRecipe): remove_attributes=['border', 'lang', 'size', 'face', 'bgcolor'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.index + 'loginnow.asp') br.select_form(nr=0) diff --git a/recipes/novistandard.recipe b/recipes/novistandard.recipe index 37d3657e41..57b93b6554 100644 --- a/recipes/novistandard.recipe +++ b/recipes/novistandard.recipe @@ -47,7 +47,7 @@ class NoviStandard(BasicNewsRecipe): preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) if self.username is not None and self.password is not None: br.select_form(name='login') diff --git a/recipes/nowa_fantastyka.recipe b/recipes/nowa_fantastyka.recipe index 0371cb1f58..7715b9826a 100644 --- a/recipes/nowa_fantastyka.recipe +++ b/recipes/nowa_fantastyka.recipe @@ -60,7 +60,7 @@ class Nowa_Fantastyka(BasicNewsRecipe): return getattr(self, 'cover_url', self.cover_url) def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.fantastyka.pl/') br.select_form(nr=0) diff --git a/recipes/nrc-nl-epub.recipe b/recipes/nrc-nl-epub.recipe index 2d190e4d0a..961eb723c2 100644 --- a/recipes/nrc-nl-epub.recipe +++ b/recipes/nrc-nl-epub.recipe @@ -29,7 +29,7 @@ class NRCHandelsblad(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://login.nrc.nl/login') br.select_form(nr=0) diff --git a/recipes/nsfw_corp.recipe b/recipes/nsfw_corp.recipe index 0ed40ade3a..37287b875e 100644 --- a/recipes/nsfw_corp.recipe +++ b/recipes/nsfw_corp.recipe @@ -47,7 +47,7 @@ class NotSafeForWork(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.LOGIN) if self.username is not None and self.password is not None: data = urllib.urlencode({ 'email':self.username diff --git a/recipes/nspm.recipe b/recipes/nspm.recipe index f5a54b0a9a..0be78bc652 100644 --- a/recipes/nspm.recipe +++ b/recipes/nspm.recipe @@ -45,7 +45,7 @@ class Nspm(BasicNewsRecipe): remove_attributes = ['width','height','lang','xmlns:fb','xmlns:og','vspace','hspace','type','start','size'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX) return br diff --git a/recipes/nursingtimes.recipe b/recipes/nursingtimes.recipe index 699bc281f3..f18baa9fff 100644 --- a/recipes/nursingtimes.recipe +++ b/recipes/nursingtimes.recipe @@ -30,7 +30,7 @@ class NursingTimes(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.LOGIN) if self.username is not None and self.password is not None: data = urllib.urlencode({ 'campaigncode' :'0' diff --git a/recipes/nytimes.recipe b/recipes/nytimes.recipe index f5b994275e..d0f311818e 100644 --- a/recipes/nytimes.recipe +++ b/recipes/nytimes.recipe @@ -358,20 +358,20 @@ class NYTimes(BasicNewsRecipe): return fixed def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) return br cover_tag = 'NY_NYT' def get_cover_url(self): cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.cover_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.cover_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/nytimes_sub.recipe b/recipes/nytimes_sub.recipe index cf25865b9c..06c476ef19 100644 --- a/recipes/nytimes_sub.recipe +++ b/recipes/nytimes_sub.recipe @@ -358,7 +358,7 @@ class NYTimes(BasicNewsRecipe): return fixed def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.nytimes.com/auth/login') br.form = br.forms().next() @@ -372,14 +372,14 @@ class NYTimes(BasicNewsRecipe): cover_tag = 'NY_NYT' def get_cover_url(self): cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.cover_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.cover_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/nzz_webpaper.recipe b/recipes/nzz_webpaper.recipe index 202cfeadab..1491518afc 100644 --- a/recipes/nzz_webpaper.recipe +++ b/recipes/nzz_webpaper.recipe @@ -78,7 +78,7 @@ class Nzz(BasicNewsRecipe): return ans def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://webpaper.nzz.ch/login') br.select_form(nr=0) diff --git a/recipes/omgubuntu.recipe b/recipes/omgubuntu.recipe index e2a619c281..efd778955a 100644 --- a/recipes/omgubuntu.recipe +++ b/recipes/omgubuntu.recipe @@ -11,7 +11,7 @@ class BasicUserRecipe1318619832(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://cdn.omgubuntu.co.uk/wp-content/themes/omgubuntu/images/logo.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/oreilly_premium.recipe b/recipes/oreilly_premium.recipe index 17b8f241ff..0088426503 100644 --- a/recipes/oreilly_premium.recipe +++ b/recipes/oreilly_premium.recipe @@ -64,7 +64,7 @@ class OReillyPremium(BasicNewsRecipe): def get_browser(self): print("In get_browser") - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://www.billoreilly.com/pg/jsp/member/membersignin.jsp') br.select_form(name='login') diff --git a/recipes/ottawa_citizen.recipe b/recipes/ottawa_citizen.recipe index 0245b65231..99052343ca 100644 --- a/recipes/ottawa_citizen.recipe +++ b/recipes/ottawa_citizen.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/people_daily.recipe b/recipes/people_daily.recipe index 76ee599e39..d783421bc4 100644 --- a/recipes/people_daily.recipe +++ b/recipes/people_daily.recipe @@ -115,7 +115,7 @@ class AdvancedUserRecipe1277129332(BasicNewsRecipe): month = time.strftime('%m') day = time.strftime('%d') cover = 'http://paper.people.com.cn/rmrb/page/'+year+'-'+month+'/'+day+'/01/RMRB'+year+month+day+'B001_b.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/phillosophy_now.recipe b/recipes/phillosophy_now.recipe index 748a81ade1..370456eb52 100644 --- a/recipes/phillosophy_now.recipe +++ b/recipes/phillosophy_now.recipe @@ -24,7 +24,7 @@ class PhilosophyNow(BasicNewsRecipe): needs_subscription = True def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('https://philosophynow.org/auth/login') br.select_form(name="loginForm") br['username'] = self.username diff --git a/recipes/physics_today.recipe b/recipes/physics_today.recipe index d1ce17cf32..87c3889517 100644 --- a/recipes/physics_today.recipe +++ b/recipes/physics_today.recipe @@ -27,7 +27,7 @@ class Physicstoday(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://ptonline.aip.org/journals/doc/PHTOAD-home/pt_login.jsp?fl=f') br.select_form(name='login_form') diff --git a/recipes/prospectmaguk.recipe b/recipes/prospectmaguk.recipe index 4ea725dded..8dd73ab8d9 100644 --- a/recipes/prospectmaguk.recipe +++ b/recipes/prospectmaguk.recipe @@ -30,7 +30,7 @@ class ProspectMagUK(BasicNewsRecipe): INDEX = 'http://www.prospectmagazine.co.uk/issue/' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.prospectmagazine.co.uk/wp-login.php') br.select_form(name='loginform') diff --git a/recipes/readitlater.recipe b/recipes/readitlater.recipe index e1d90b22c2..8344d82826 100644 --- a/recipes/readitlater.recipe +++ b/recipes/readitlater.recipe @@ -34,7 +34,7 @@ class Pocket(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None: br.open(self.LOGIN) br.select_form(nr=0) diff --git a/recipes/real_clear.recipe b/recipes/real_clear.recipe index cbf5a2f8e4..7c420a21b9 100644 --- a/recipes/real_clear.recipe +++ b/recipes/real_clear.recipe @@ -128,7 +128,7 @@ class RealClear(BasicNewsRecipe): def get_browser(self): if self.debugMessages == True : print("In get_browser") - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) return br def parseRSS(self, index) : diff --git a/recipes/regina_leader_post.recipe b/recipes/regina_leader_post.recipe index 77842b96b6..0ca00da268 100644 --- a/recipes/regina_leader_post.recipe +++ b/recipes/regina_leader_post.recipe @@ -101,14 +101,14 @@ class CanWestPaper(BasicNewsRecipe): if self.fp_tag=='': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/saskatoon_star_phoenix.recipe b/recipes/saskatoon_star_phoenix.recipe index b17e1ee038..2a2e90e28f 100644 --- a/recipes/saskatoon_star_phoenix.recipe +++ b/recipes/saskatoon_star_phoenix.recipe @@ -101,14 +101,14 @@ class CanWestPaper(BasicNewsRecipe): if self.fp_tag=='': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/science_aas.recipe b/recipes/science_aas.recipe index 2d486e4458..f2810fdeaa 100644 --- a/recipes/science_aas.recipe +++ b/recipes/science_aas.recipe @@ -24,7 +24,7 @@ class ScienceAAS(BasicNewsRecipe): LOGIN = 'http://www.sciencemag.org/cgi/login?uri=%2Findex.dtl' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.LOGIN) br.select_form(nr=0) diff --git a/recipes/scmp.recipe b/recipes/scmp.recipe index a4f4bf497c..f2981ca667 100644 --- a/recipes/scmp.recipe +++ b/recipes/scmp.recipe @@ -34,7 +34,7 @@ class SCMP(BasicNewsRecipe): } def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) #br.set_debug_http(True) #br.set_debug_responses(True) #br.set_debug_redirects(True) diff --git a/recipes/singtaohk.recipe b/recipes/singtaohk.recipe index a038372693..d830381731 100644 --- a/recipes/singtaohk.recipe +++ b/recipes/singtaohk.recipe @@ -102,7 +102,7 @@ class STHKRecipe(BasicNewsRecipe): diff = todaydate - date(2011, 12, 29) base = base + int(diff.total_seconds()/(3600*24)) cover = 'http://singtao.com/media/a/a(' + str(base) +').jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/slate.recipe b/recipes/slate.recipe index 36560cdf33..28d35a415e 100644 --- a/recipes/slate.recipe +++ b/recipes/slate.recipe @@ -85,7 +85,7 @@ class Slate(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://img.slate.com/images/redesign2008/slate_logo.gif' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/smilezilla.recipe b/recipes/smilezilla.recipe index 242ee8c42a..3f5534785a 100644 --- a/recipes/smilezilla.recipe +++ b/recipes/smilezilla.recipe @@ -34,7 +34,7 @@ class SmileZilla(BasicNewsRecipe): f.close() return BeautifulSoup(html, fromEncoding=self.encoding) - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) response = br.open(url) html = response.read() soup = BeautifulSoup(html, fromEncoding=self.encoding) diff --git a/recipes/staradvertiser.recipe b/recipes/staradvertiser.recipe index bf9c6460a1..283f2bba3c 100644 --- a/recipes/staradvertiser.recipe +++ b/recipes/staradvertiser.recipe @@ -52,7 +52,7 @@ class Starbulletin(BasicNewsRecipe): ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://www.staradvertiser.com/manage/Login/') br.select_form(name='loginForm') diff --git a/recipes/sueddeutschezeitung.recipe b/recipes/sueddeutschezeitung.recipe index f38f80dd45..281f66ef59 100644 --- a/recipes/sueddeutschezeitung.recipe +++ b/recipes/sueddeutschezeitung.recipe @@ -40,7 +40,7 @@ class SueddeutcheZeitung(BasicNewsRecipe): remove_attributes = ['height','width','style'] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.INDEX) br.select_form(name='lbox') diff --git a/recipes/sunday_times.recipe b/recipes/sunday_times.recipe index 973f1792c7..2ffb65423d 100644 --- a/recipes/sunday_times.recipe +++ b/recipes/sunday_times.recipe @@ -42,7 +42,7 @@ class TimesOnline(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.thesundaytimes.co.uk/sto/') if self.username is not None and self.password is not None: data = urllib.urlencode({ diff --git a/recipes/techtarget.recipe b/recipes/techtarget.recipe index 888ec7fac0..d5f4972a92 100644 --- a/recipes/techtarget.recipe +++ b/recipes/techtarget.recipe @@ -17,7 +17,7 @@ class TechTarget(BasicNewsRecipe): LOGIN = u'http://searchservervirtualization.techtarget.com/login' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None: br.open(self.LOGIN) br.select_form(nr=1) diff --git a/recipes/the_age.recipe b/recipes/the_age.recipe index 415ff0a25d..b9e59527b6 100644 --- a/recipes/the_age.recipe +++ b/recipes/the_age.recipe @@ -24,7 +24,7 @@ class TheAge(BasicNewsRecipe): remove_tags = [dict(name=['table', 'script', 'noscript', 'style']), dict(name='a', attrs={'href':'/'}), dict(name='a', attrs={'href':'/text/'})] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.set_handle_refresh(False) return br diff --git a/recipes/the_nation.recipe b/recipes/the_nation.recipe index a830817762..073beb067c 100644 --- a/recipes/the_nation.recipe +++ b/recipes/the_nation.recipe @@ -45,7 +45,7 @@ class Thenation(BasicNewsRecipe): return url.replace('.thenation.com/','.thenation.com/print/') def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.thenation.com/') if self.username is not None and self.password is not None: br.open(self.login_url) diff --git a/recipes/times_online.recipe b/recipes/times_online.recipe index 1299c92fa3..2213c3a116 100644 --- a/recipes/times_online.recipe +++ b/recipes/times_online.recipe @@ -41,7 +41,7 @@ class TimesOnline(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.thetimes.co.uk/tto/news/') if self.username is not None and self.password is not None: data = urllib.urlencode({ diff --git a/recipes/tomshardware.recipe b/recipes/tomshardware.recipe index bcf154c8fb..c75b19189d 100644 --- a/recipes/tomshardware.recipe +++ b/recipes/tomshardware.recipe @@ -33,7 +33,7 @@ class Tomshardware(BasicNewsRecipe): html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX+'/us/') if self.username is not None and self.password is not None: data = urllib.urlencode({ 'action':'login_action' diff --git a/recipes/toyokeizai.recipe b/recipes/toyokeizai.recipe index a50558f8e8..c8e57eba53 100644 --- a/recipes/toyokeizai.recipe +++ b/recipes/toyokeizai.recipe @@ -58,7 +58,7 @@ class Toyokeizai(BasicNewsRecipe): return feeds def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://member.toyokeizai.net/norights/form/') br.select_form(nr=0) diff --git a/recipes/usatoday.recipe b/recipes/usatoday.recipe index 8fdb6eef30..12ffec38f0 100644 --- a/recipes/usatoday.recipe +++ b/recipes/usatoday.recipe @@ -52,7 +52,7 @@ class USAToday(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://i.usatoday.net/mobile/_common/_images/565x73_usat_mobile.gif' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/recipes/vancouver_provice.recipe b/recipes/vancouver_provice.recipe index 690daefbc2..9bb8085fdc 100644 --- a/recipes/vancouver_provice.recipe +++ b/recipes/vancouver_provice.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/vancouver_province.recipe b/recipes/vancouver_province.recipe index 5687c7c858..0648f29f41 100644 --- a/recipes/vancouver_province.recipe +++ b/recipes/vancouver_province.recipe @@ -101,14 +101,14 @@ class CanWestPaper(BasicNewsRecipe): if self.fp_tag=='': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/vancouver_sun.recipe b/recipes/vancouver_sun.recipe index 1cfacb9639..faea272558 100644 --- a/recipes/vancouver_sun.recipe +++ b/recipes/vancouver_sun.recipe @@ -132,14 +132,14 @@ class CanWestPaper(BasicNewsRecipe): def get_cover_url(self): from datetime import timedelta, date cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/vic_times.recipe b/recipes/vic_times.recipe index 076f4fa8a9..391cf5eff4 100644 --- a/recipes/vic_times.recipe +++ b/recipes/vic_times.recipe @@ -101,14 +101,14 @@ class CanWestPaper(BasicNewsRecipe): if self.fp_tag=='': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/vreme.recipe b/recipes/vreme.recipe index 26cba743ad..fbc6d0805c 100644 --- a/recipes/vreme.recipe +++ b/recipes/vreme.recipe @@ -22,18 +22,18 @@ class Vreme(BasicNewsRecipe): use_embedded_content = False encoding = 'utf-8' language = 'sr' - publication_type = 'magazine' + publication_type = 'magazine' masthead_url = 'http://www.vreme.com/g/vreme-logo.gif' - extra_css = """ + extra_css = """ @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} - @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} - body{font-family: serif1, serif} - .article_description{font-family: serif1, serif} - .heading1{font-family: sans1, sans-serif; font-size: x-large; font-weight: bold} .heading2{font-family: sans1, sans-serif; font-size: large; font-weight: bold} .toc-heading{font-family: sans1, sans-serif; font-size: small} - .column-heading2{font-family: sans1, sans-serif; font-size: large} - .column-heading1{font-family: sans1, sans-serif; font-size: x-large} - .column-normal{font-family: sans1, sans-serif; font-size: medium} - .large{font-family: sans1, sans-serif; font-size: large} + @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} + body{font-family: serif1, serif} + .article_description{font-family: serif1, serif} + .heading1{font-family: sans1, sans-serif; font-size: x-large; font-weight: bold} .heading2{font-family: sans1, sans-serif; font-size: large; font-weight: bold} .toc-heading{font-family: sans1, sans-serif; font-size: small} + .column-heading2{font-family: sans1, sans-serif; font-size: large} + .column-heading1{font-family: sans1, sans-serif; font-size: x-large} + .column-normal{font-family: sans1, sans-serif; font-size: medium} + .large{font-family: sans1, sans-serif; font-size: large} """ conversion_options = { @@ -50,7 +50,7 @@ class Vreme(BasicNewsRecipe): remove_tags_after = dict(attrs={'class':'footer' }) def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open(self.LOGIN) br.select_form(name='f') @@ -64,7 +64,7 @@ class Vreme(BasicNewsRecipe): soup = self.index_to_soup(self.INDEX) cover_item = soup.find('div',attrs={'id':'najava'}) if cover_item: - self.cover_url = self.INDEX + cover_item.img['src'] + self.cover_url = self.INDEX + cover_item.img['src'] for item in soup.findAll(['h3','h4']): description = u'' title_prefix = u'' diff --git a/recipes/windsor_star.recipe b/recipes/windsor_star.recipe index 8f10cff462..f294674219 100644 --- a/recipes/windsor_star.recipe +++ b/recipes/windsor_star.recipe @@ -102,14 +102,14 @@ class CanWestPaper(BasicNewsRecipe): if self.fp_tag=='': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) daysback=1 try: br.open(cover) except: while daysback<7: cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.fp_tag+'.jpg' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(cover) except: diff --git a/recipes/winsupersite.recipe b/recipes/winsupersite.recipe index 910dfd9125..8670ae5928 100644 --- a/recipes/winsupersite.recipe +++ b/recipes/winsupersite.recipe @@ -21,7 +21,7 @@ class Winsupersite(BasicNewsRecipe): lambda match: ''), ] def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open('http://www.winsupersite.com') return br diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 057da7adf7..f4254ee7cc 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -57,7 +57,7 @@ class WallStreetJournal(BasicNewsRecipe): def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('http://commerce.wsj.com/auth/login') br.select_form(nr=1) diff --git a/recipes/ynet.recipe b/recipes/ynet.recipe index b77e1a36a6..45142a41a4 100644 --- a/recipes/ynet.recipe +++ b/recipes/ynet.recipe @@ -63,7 +63,7 @@ class AdvancedUserRecipe1283848012(BasicNewsRecipe): def print_version(self, url): #remove from here - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.open(url) br.follow_link(mechanize.Link(base_url = '', url =url, text = '', tag = 'a', attrs = [{'id':'buzzerATop'}])) #to here to stop supporting ynet... diff --git a/recipes/zaobao.recipe b/recipes/zaobao.recipe index 249016a50e..0e2854c12b 100644 --- a/recipes/zaobao.recipe +++ b/recipes/zaobao.recipe @@ -155,6 +155,6 @@ class ZAOBAO(BasicNewsRecipe): return parsed_feeds def get_browser(self): - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) br.addheaders.append(('Pragma', 'no-cache')) return br diff --git a/recipes/zdnet.fr.recipe b/recipes/zdnet.fr.recipe index c5541e50c1..56cbf0ac96 100644 --- a/recipes/zdnet.fr.recipe +++ b/recipes/zdnet.fr.recipe @@ -59,7 +59,7 @@ class zdnet(BasicNewsRecipe): def get_masthead_url(self): masthead = 'http://www.zdnet.fr/images/base/logo.png' - br = BasicNewsRecipe.get_browser() + br = BasicNewsRecipe.get_browser(self) try: br.open(masthead) except: diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 6f75f4de98..b2dedf74db 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -1705,22 +1705,31 @@ class DeviceMixin(object): # {{{ return mi = db.get_metadata(id_, index_is_id=True, get_cover=get_covers) book.smart_update(mi, replace_metadata=True) - if get_covers: + if get_covers and desired_thumbnail_height != 0: if book.cover and os.access(book.cover, os.R_OK): book.thumbnail = self.cover_to_thumbnail(open(book.cover, 'rb').read()) else: book.thumbnail = self.default_thumbnail + def updateq(id_, book): + try: + return (update_metadata and + (db.metadata_last_modified(id_, index_is_id=True) != + getattr(book, 'last_modified', None) or + (isinstance(getattr(book, 'thumbnail', None), (list, tuple)) + and max(book.thumbnail[0], book.thumbnail[1]) != desired_thumbnail_height + ) + ) + ) + except: + return True + for booklist in booklists: for book in booklist: book.in_library = None if getattr(book, 'uuid', None) in self.db_book_uuid_cache: id_ = db_book_uuid_cache[book.uuid] - if (db.metadata_last_modified(id_, index_is_id=True) != - getattr(book, 'last_modified', None) - or (not book.thumbnail - or max(book.thumbnail[0], book.thumbnail[1]) != - desired_thumbnail_height)): + if updateq(id_, book): update_book(id_, book) book.in_library = 'UUID' # ensure that the correct application_id is set