mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
merge from trunk
This commit is contained in:
commit
f606af13a1
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -25,7 +25,7 @@ class JBPress(BasicNewsRecipe):
|
||||
<input id="rememberme" name="rememberme" type="checkbox"/>
|
||||
</form>
|
||||
'''
|
||||
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()
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -31,7 +31,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
||||
m:'<head></head>')]
|
||||
|
||||
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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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) :
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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({
|
||||
|
@ -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)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user