blob: b60d608ea27f95f8d964cd5623b099e9363d459b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env python
import humblebundle
import sys
import os
filename = sys.argv[2]
username = sys.argv[3]
password = os.environ['PASSWORD']
client = humblebundle.HumbleApi()
client.login(username, password)
order_list = client.order_list()
for order in order_list:
for subproduct in order.subproducts:
for download in subproduct.downloads:
for download_struct in download.download_struct:
url = download_struct.url.web
if filename in url:
print(url)
exit()
|