diff --git a/gallery_dl/extractor/gfycat.py b/gallery_dl/extractor/gfycat.py index 6d31f7dc..2757852e 100644 --- a/gallery_dl/extractor/gfycat.py +++ b/gallery_dl/extractor/gfycat.py @@ -10,7 +10,6 @@ from .common import Extractor, Message from .. import text, exception -from ..cache import cache class GfycatExtractor(Extractor): @@ -155,7 +154,6 @@ class GfycatImageExtractor(GfycatExtractor): class GfycatAPI(): API_ROOT = "https://api.gfycat.com" - ACCESS_KEY = "Anr96uuqt9EdamSCwK4txKPjMsf2M95Rfa5FLLhPFucu8H5HTzeutyAa" def __init__(self, extractor): self.extractor = extractor @@ -175,23 +173,8 @@ class GfycatAPI(): params = {"search_text": query, "count": 150} return self._pagination(endpoint, params) - @cache(keyarg=1, maxage=3600) - def _authenticate_impl(self, category): - 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} - response = self.extractor.request( - url, method="POST", headers=headers, json=data) - return "Bearer " + response.json()["access_token"] - def _call(self, endpoint, params=None): url = self.API_ROOT + endpoint - self.headers["Authorization"] = self._authenticate_impl( - self.extractor.category) return self.extractor.request( url, params=params, headers=self.headers).json() diff --git a/gallery_dl/extractor/redgifs.py b/gallery_dl/extractor/redgifs.py index 576564c3..e078bef6 100644 --- a/gallery_dl/extractor/redgifs.py +++ b/gallery_dl/extractor/redgifs.py @@ -72,5 +72,3 @@ class RedgifsImageExtractor(RedgifsExtractor): class RedgifsAPI(GfycatAPI): API_ROOT = "https://api.redgifs.com" - ACCESS_KEY = ("dBLwVuGn9eq4dtXLs8WSfpjcYFY7bPQe" - "AqGPSFgqeW5B9uzj2cMVhF63pTFF4Rg9")