mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
http -> https
This commit is contained in:
parent
22914029e8
commit
6779e93f7e
@ -23,7 +23,7 @@ class HistoryToday(BasicNewsRecipe):
|
||||
def get_browser(self):
|
||||
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.open('https://www.historytoday.com/user/login')
|
||||
br.select_form(nr=1)
|
||||
br['name'] = self.username
|
||||
br['pass'] = self.password
|
||||
@ -40,13 +40,13 @@ class HistoryToday(BasicNewsRecipe):
|
||||
def parse_index(self):
|
||||
|
||||
# Find date
|
||||
soup0 = self.index_to_soup('http://www.historytoday.com/')
|
||||
soup0 = self.index_to_soup('https://www.historytoday.com/')
|
||||
dates = self.tag_to_string(soup0.find(
|
||||
'div', attrs={'id': 'block-block-226'}).span)
|
||||
self.timefmt = u' [%s]' % dates
|
||||
|
||||
# Go to issue
|
||||
soup = self.index_to_soup('http://www.historytoday.com/contents')
|
||||
soup = self.index_to_soup('https://www.historytoday.com/contents')
|
||||
cover = soup.find('div', attrs={
|
||||
'id': 'content-area'}).find('img', attrs={'src': re.compile('.*cover.*')})['src']
|
||||
self.cover_url = cover
|
||||
@ -69,12 +69,12 @@ class HistoryToday(BasicNewsRecipe):
|
||||
if len(subarticle) < 2:
|
||||
continue
|
||||
title = self.tag_to_string(subarticle[0])
|
||||
originalurl = "http://www.historytoday.com" + \
|
||||
originalurl = "https://www.historytoday.com" + \
|
||||
subarticle[0].span.a['href'].strip()
|
||||
originalpage = self.index_to_soup(originalurl)
|
||||
printurl = originalpage.find(
|
||||
'div', attrs={'id': 'ht-tools'}).a['href'].strip()
|
||||
url = "http://www.historytoday.com" + printurl
|
||||
url = "https://www.historytoday.com" + printurl
|
||||
desc = self.tag_to_string(subarticle[1])
|
||||
articles.append({'title': title, 'url': url,
|
||||
'description': desc, 'date': ''})
|
||||
@ -88,4 +88,4 @@ class HistoryToday(BasicNewsRecipe):
|
||||
return ans
|
||||
|
||||
def cleanup(self):
|
||||
self.browser.open('http://www.historytoday.com/logout')
|
||||
self.browser.open('https://www.historytoday.com/logout')
|
||||
|
Loading…
x
Reference in New Issue
Block a user