You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
528 B

#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import json
from pathlib import Path
import sys
def main():
if not Path('r_gdl_lbe.json').exists():
print('"r_gdl_lbe.json" does not exist')
elif len(sys.argv) != 3:
print('Usage:')
print(f' {sys.argv[0]} <downloader> <remaining_links>')
else:
dldr = sys.argv[1]
rlnk = int(sys.argv[2])
data = json.loads(Path('r_gdl_lbe.json').read_bytes())
print(data[dldr][-rlnk])
if __name__ == '__main__':
main()