Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #28 from heziiop/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Dec 10, 2022
2 parents 45e2a82 + 7f0b1a1 commit e7675f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions earth_wallpaper/interfaces/anime.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ def __init__(self):
self.proxies = Settings().proxies()
self.download_dir = PlatformInfo().download_dir()
self.download_path = None
self.request_url = "https://api.waifu.im/random?orientation=LANDSCAPE"
self.request_url = "https://api.waifu.im/search?orientation=LANDSCAPE"
self.img_url = None

def get_img_url(self):
res = requests.get(self.request_url, proxies=self.proxies)
headers = {'Accept-Version': 'v4'}
res = requests.get(self.request_url, headers=headers, proxies=self.proxies)
if res.ok:
res = json.loads(res.text)
self.img_url = res["images"][0]["url"]
Expand Down

0 comments on commit e7675f0

Please sign in to comment.