mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow re-use of method to get any URL
This commit is contained in:
parent
28455a23c4
commit
ffdf794246
@ -99,9 +99,10 @@ def parse_metadata(full_name, raw_bytes):
|
||||
return module_version, minimum_calibre_version
|
||||
|
||||
|
||||
def fetch_module(full_name, etag=None, timeout=default_timeout):
|
||||
def fetch_module(full_name, etag=None, timeout=default_timeout, url=None):
|
||||
if timeout is default_timeout:
|
||||
timeout = DEFAULT_TIMEOUT
|
||||
if url is None:
|
||||
path = '/'.join(full_name.split('.')) + '.py'
|
||||
url = 'https://code.calibre-ebook.com/src/' + path
|
||||
headers = {'accept-encoding': 'gzip'}
|
||||
|
Loading…
x
Reference in New Issue
Block a user