handle records without downloads
parent
6094de0e44
commit
bade8e7f4d
|
@ -393,6 +393,20 @@ def add_by_doab(doab_id, record=None):
|
|||
url_to_provider(dl_url) if dl_url else None,
|
||||
**metadata
|
||||
)
|
||||
else:
|
||||
if 'format' in metadata:
|
||||
del metadata['format']
|
||||
edition = load_doab_edition(
|
||||
title,
|
||||
doab_id,
|
||||
'',
|
||||
'',
|
||||
license,
|
||||
language,
|
||||
isbns,
|
||||
None,
|
||||
**metadata
|
||||
)
|
||||
return edition
|
||||
except IdDoesNotExistError:
|
||||
return None
|
||||
|
|
|
@ -103,6 +103,8 @@ FRONTIERSIN = re.compile(r'frontiersin.org/books/[^/]+/(\d+)')
|
|||
|
||||
def online_to_download(url):
|
||||
urls = []
|
||||
if not url:
|
||||
return urls
|
||||
if url.find(u'mdpi.com/books/pdfview/book/') >= 0:
|
||||
doc = get_soup(url)
|
||||
if doc:
|
||||
|
|
Loading…
Reference in New Issue