[redgifs] update API server address (fixes #1632)

napi.redgifs.com -> api.redgifs.com
This commit is contained in:
Mike Fährmann
2021-06-16 23:07:25 +02:00
parent 0d2961ae81
commit cac0110d8b
2 changed files with 5 additions and 2 deletions

View File

@@ -177,7 +177,10 @@ class GfycatAPI():
@cache(keyarg=1, maxage=3600)
def _authenticate_impl(self, category):
url = "https://weblogin." + category + ".com/oauth/webtoken"
if category == "redgifs":
url = "https://api.redgifs.com/v1/oauth/webtoken"
else:
url = "https://weblogin." + category + ".com/oauth/webtoken"
data = {"access_key": self.ACCESS_KEY}
headers = {"Referer": self.extractor.root + "/",
"Origin" : self.extractor.root}

View File

@@ -71,6 +71,6 @@ class RedgifsImageExtractor(RedgifsExtractor):
class RedgifsAPI(GfycatAPI):
API_ROOT = "https://napi.redgifs.com"
API_ROOT = "https://api.redgifs.com"
ACCESS_KEY = ("dBLwVuGn9eq4dtXLs8WSfpjcYFY7bPQe"
"AqGPSFgqeW5B9uzj2cMVhF63pTFF4Rg9")