Skip to content

Commit 6922acf

Browse files
committed
Make sure downloads is a list of 1
1 parent fd48404 commit 6922acf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libgen_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, url, format, size, unit):
3939
def parse(node):
4040
url = node.get('href').replace('ads.php', 'get.php')
4141

42-
return LibgenDownload(url, 'EPUB', 'Unknown', '')
42+
return LibgenDownload(url, 'EPUB', 'Unknown', 'Unknown')
4343

4444
class LibgenBook:
4545
def __init__(self, title, author, series, downloads, language, image_url):
@@ -73,7 +73,7 @@ def parse(node):
7373
if not author and not title:
7474
return None
7575

76-
return LibgenBook(title, author, series, downloads[0], language, None)
76+
return LibgenBook(title, author, series, downloads[0:1], language, None)
7777

7878
class LibgenSearchResults:
7979
def __init__(self, results, total):

0 commit comments

Comments
 (0)