updating URLs that im posting images from
This commit is contained in:
parent
1c7ffb5358
commit
89a263f94b
@ -13,11 +13,12 @@ def get_image(boards):
|
||||
boards = random.choice(boards)
|
||||
|
||||
domains = [
|
||||
'my.mixtape.moe',
|
||||
'cdn.awwni.m',
|
||||
'i.imgur.com',
|
||||
'imgur.com',
|
||||
'i.redd.it',
|
||||
'i.reddituploads.com',
|
||||
'imgur.com',
|
||||
'my.mixtape.moe',
|
||||
]
|
||||
|
||||
response = requests.get(
|
||||
@ -26,4 +27,4 @@ def get_image(boards):
|
||||
).json()['data']['children']
|
||||
|
||||
image_urls = list(filter(lambda x: x['data']['domain'] in domains, response))
|
||||
return random.choice(image_urls)['data']['url'].replace('http://', 'https://')
|
||||
return random.choice(image_urls)['data']['url'].replace('http://', 'https://')
|
||||
|
Loading…
x
Reference in New Issue
Block a user