mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
fix(lrts): can not download audio for the count less than pagesize
This commit is contained in:
parent
e37836a40b
commit
9432ce3c71
@ -40,7 +40,6 @@ def lrts_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
'Referer': url
|
||||
}
|
||||
items = []
|
||||
if (total_count > page_size):
|
||||
for page in range(first_page, last_page):
|
||||
page_url = 'http://www.lrts.me/ajax/book/%s/%s/%s' % (book_no, page, page_size)
|
||||
response_content = json.loads(post_content(page_url, headers))
|
||||
@ -53,7 +52,6 @@ def lrts_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
items.extend(data)
|
||||
else:
|
||||
break
|
||||
|
||||
headers = {
|
||||
'Referer': 'http://www.lrts.me/playlist'
|
||||
}
|
||||
@ -61,7 +59,6 @@ def lrts_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
for item in items:
|
||||
i_url = 'http://www.lrts.me/ajax/path/4/%s/%s' % (item['fatherResId'], item['resId'])
|
||||
response_content = json.loads(post_content(i_url, headers))
|
||||
logging.debug(response_content)
|
||||
if response_content['status'] == 'success' and response_content['data']:
|
||||
item['ok'] = True
|
||||
item['url'] = response_content['data']
|
||||
|
Loading…
Reference in New Issue
Block a user