mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use https urls where possible.
This commit is contained in:
parent
96c71e7ae4
commit
2fe269a161
@ -903,7 +903,7 @@ class Application(QApplication):
|
|||||||
'calibre versions newer than 2.0 do not run on Windows XP. This is'
|
'calibre versions newer than 2.0 do not run on Windows XP. This is'
|
||||||
' because the graphics toolkit calibre uses (Qt 5) crashes a lot'
|
' because the graphics toolkit calibre uses (Qt 5) crashes a lot'
|
||||||
' on Windows XP. We suggest you stay with <a href="%s">calibre 1.48</a>'
|
' on Windows XP. We suggest you stay with <a href="%s">calibre 1.48</a>'
|
||||||
' which works well on Windows XP.') % 'http://download.calibre-ebook.com/1.48.0/', show=True)
|
' which works well on Windows XP.') % 'https://download.calibre-ebook.com/1.48.0/', show=True)
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
if iswindows:
|
if iswindows:
|
||||||
|
@ -28,7 +28,7 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
|||||||
class WHSmithUKStore(BasicStoreConfig, StorePlugin):
|
class WHSmithUKStore(BasicStoreConfig, StorePlugin):
|
||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
url = 'http://www.whsmith.co.uk/'
|
url = 'https://www.whsmith.co.uk/'
|
||||||
url_details = ''
|
url_details = ''
|
||||||
|
|
||||||
if external or self.config.get('open_external', False):
|
if external or self.config.get('open_external', False):
|
||||||
@ -45,7 +45,7 @@ class WHSmithUKStore(BasicStoreConfig, StorePlugin):
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
url = ('http://www.whsmith.co.uk/search?keywordCategoryId=wc_dept_ebooks&results=60'
|
url = ('https://www.whsmith.co.uk/search?keywordCategoryId=wc_dept_ebooks&results=60'
|
||||||
'&page=1&keywords=' + quote(query))
|
'&page=1&keywords=' + quote(query))
|
||||||
|
|
||||||
br = browser()
|
br = browser()
|
||||||
@ -59,7 +59,7 @@ class WHSmithUKStore(BasicStoreConfig, StorePlugin):
|
|||||||
id_ = ''.join(data.xpath('./a[@class="product_image_wrap"]/@href'))
|
id_ = ''.join(data.xpath('./a[@class="product_image_wrap"]/@href'))
|
||||||
if not id_:
|
if not id_:
|
||||||
continue
|
continue
|
||||||
id_ = 'http://www.whsmith.co.uk' + id_
|
id_ = 'https://www.whsmith.co.uk' + id_
|
||||||
cover_url = ''.join(data.xpath('.//img[@class="product_image"]/@src'))
|
cover_url = ''.join(data.xpath('.//img[@class="product_image"]/@src'))
|
||||||
title = ''.join(data.xpath('.//h4[@class="product_title"]/text()'))
|
title = ''.join(data.xpath('.//h4[@class="product_title"]/text()'))
|
||||||
author = ', '.join(data.xpath('.//span[@class="product_second"]/text()'))
|
author = ', '.join(data.xpath('.//span[@class="product_second"]/text()'))
|
||||||
|
@ -36,7 +36,7 @@ def as_base64(data):
|
|||||||
|
|
||||||
|
|
||||||
def search(query, max_results=10, timeout=60):
|
def search(query, max_results=10, timeout=60):
|
||||||
url = 'http://woblink.com/publication/ajax?mode=none&query=' + quote_plus(query)
|
url = 'https://woblink.com/publication/ajax?mode=none&query=' + quote_plus(query)
|
||||||
if max_results > 10:
|
if max_results > 10:
|
||||||
if max_results > 20:
|
if max_results > 20:
|
||||||
url += '&limit=30'
|
url += '&limit=30'
|
||||||
@ -47,7 +47,7 @@ def search(query, max_results=10, timeout=60):
|
|||||||
rq = Request(url, headers={
|
rq = Request(url, headers={
|
||||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
'X-Requested-With': 'XMLHttpRequest',
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
'Referrer':'http://woblink.com/ebooki-kategorie',
|
'Referrer':'https://woblink.com/ebooki-kategorie',
|
||||||
'Cache-Control':'max-age=0',
|
'Cache-Control':'max-age=0',
|
||||||
}, data=urlencode({
|
}, data=urlencode({
|
||||||
'nw_filtry_filtr_zakrescen_formularz[min]':'0',
|
'nw_filtry_filtr_zakrescen_formularz[min]':'0',
|
||||||
@ -89,13 +89,13 @@ class WoblinkStore(BasicStoreConfig, StorePlugin):
|
|||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/16/58/'
|
aff_root = 'https://www.a4b-tracking.com/pl/stat-click-text-link/16/58/'
|
||||||
url = 'http://woblink.com/publication'
|
url = 'https://woblink.com/publication'
|
||||||
|
|
||||||
aff_url = aff_root + as_base64(url)
|
aff_url = aff_root + as_base64(url)
|
||||||
detail_url = None
|
detail_url = None
|
||||||
|
|
||||||
if detail_item:
|
if detail_item:
|
||||||
detail_url = aff_root + as_base64('http://woblink.com' + detail_item)
|
detail_url = aff_root + as_base64('https://woblink.com' + detail_item)
|
||||||
|
|
||||||
if external or self.config.get('open_external', False):
|
if external or self.config.get('open_external', False):
|
||||||
open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url)))
|
open_url(QUrl(url_slash_cleaner(detail_url if detail_url else aff_url)))
|
||||||
|
@ -29,7 +29,7 @@ class WolneLekturyStore(BasicStoreConfig, StorePlugin):
|
|||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
|
|
||||||
url = 'http://wolnelektury.pl'
|
url = 'https://wolnelektury.pl'
|
||||||
detail_url = None
|
detail_url = None
|
||||||
|
|
||||||
if detail_item:
|
if detail_item:
|
||||||
@ -44,7 +44,7 @@ class WolneLekturyStore(BasicStoreConfig, StorePlugin):
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
url = 'http://wolnelektury.pl/szukaj?q=' + quote_plus(query)
|
url = 'https://wolnelektury.pl/szukaj?q=' + quote_plus(query)
|
||||||
|
|
||||||
br = browser()
|
br = browser()
|
||||||
|
|
||||||
@ -69,13 +69,13 @@ class WolneLekturyStore(BasicStoreConfig, StorePlugin):
|
|||||||
s = SearchResult()
|
s = SearchResult()
|
||||||
for link in data.xpath('.//div[@class="book-box-formats"]/span/a'):
|
for link in data.xpath('.//div[@class="book-box-formats"]/span/a'):
|
||||||
ext = ''.join(link.xpath('./text()'))
|
ext = ''.join(link.xpath('./text()'))
|
||||||
href = 'http://wolnelektury.pl' + link.get('href')
|
href = 'https://wolnelektury.pl' + link.get('href')
|
||||||
s.downloads[ext] = href
|
s.downloads[ext] = href
|
||||||
s.cover_url = 'http://wolnelektury.pl' + cover_url.strip()
|
s.cover_url = 'https://wolnelektury.pl' + cover_url.strip()
|
||||||
s.title = title.strip()
|
s.title = title.strip()
|
||||||
s.author = author
|
s.author = author
|
||||||
s.price = price
|
s.price = price
|
||||||
s.detail_item = 'http://wolnelektury.pl' + id
|
s.detail_item = 'https://wolnelektury.pl' + id
|
||||||
s.formats = ', '.join(s.downloads.keys())
|
s.formats = ', '.join(s.downloads.keys())
|
||||||
s.drm = SearchResult.DRM_UNLOCKED
|
s.drm = SearchResult.DRM_UNLOCKED
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@ from calibre.gui2.store.search_result import SearchResult
|
|||||||
|
|
||||||
class XinXiiStore(BasicStoreConfig, OpenSearchOPDSStore):
|
class XinXiiStore(BasicStoreConfig, OpenSearchOPDSStore):
|
||||||
|
|
||||||
open_search_url = 'http://www.xinxii.com/catalog-search/'
|
open_search_url = 'https://www.xinxii.com/catalog-search/'
|
||||||
web_url = 'http://xinxii.com/'
|
web_url = 'https://xinxii.com/'
|
||||||
|
|
||||||
# http://www.xinxii.com/catalog/
|
# https://www.xinxii.com/catalog/
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
'''
|
'''
|
||||||
@ -42,7 +42,7 @@ class XinXiiStore(BasicStoreConfig, OpenSearchOPDSStore):
|
|||||||
function so this one is modified to remove parts that are used.
|
function so this one is modified to remove parts that are used.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
url = 'http://www.xinxii.com/catalog-search/query/?keywords=' + quote_plus(query)
|
url = 'https://www.xinxii.com/catalog-search/query/?keywords=' + quote_plus(query)
|
||||||
|
|
||||||
counter = max_results
|
counter = max_results
|
||||||
br = browser()
|
br = browser()
|
||||||
|
@ -67,7 +67,7 @@ class AddDictionary(QDialog): # {{{
|
|||||||
download more dictionaries from <a href="{1}">the LibreOffice extensions repository</a>.
|
download more dictionaries from <a href="{1}">the LibreOffice extensions repository</a>.
|
||||||
The dictionary will download as an .oxt file. Simply specify the path to the
|
The dictionary will download as an .oxt file. Simply specify the path to the
|
||||||
downloaded .oxt file here to add the dictionary to {0}.''').format(
|
downloaded .oxt file here to add the dictionary to {0}.''').format(
|
||||||
__appname__, 'http://extensions.libreoffice.org/extension-center?getCategories=Dictionary&getCompatibility=any&sort_on=positive_ratings')+'<p>') # noqa
|
__appname__, 'https://extensions.libreoffice.org/extension-center?getCategories=Dictionary&getCompatibility=any&sort_on=positive_ratings')+'<p>') # noqa
|
||||||
la.setWordWrap(True)
|
la.setWordWrap(True)
|
||||||
la.setOpenExternalLinks(True)
|
la.setOpenExternalLinks(True)
|
||||||
la.setMinimumWidth(450)
|
la.setMinimumWidth(450)
|
||||||
|
@ -23,7 +23,7 @@ if iswindows:
|
|||||||
except:
|
except:
|
||||||
raise RuntimeError('NUL file missing in windows. This indicates a'
|
raise RuntimeError('NUL file missing in windows. This indicates a'
|
||||||
' corrupted windows. You should contact Microsoft'
|
' corrupted windows. You should contact Microsoft'
|
||||||
' for assistance and/or follow the steps described here: http://bytes.com/topic/net/answers/264804-compile-error-null-device-missing')
|
' for assistance and/or follow the steps described here: https://bytes.com/topic/net/answers/264804-compile-error-null-device-missing')
|
||||||
|
|
||||||
|
|
||||||
def renice(niceness):
|
def renice(niceness):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user