Skip to content

Commit

Permalink
[FikperCom] fix #4412
Browse files Browse the repository at this point in the history
  • Loading branch information
GammaC0de committed Dec 21, 2023
1 parent 67290a6 commit eb8a921
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions module/plugins/hoster/FikperCom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

import pycurl

from ..captcha.HCaptcha import HCaptcha
from ..captcha.SolveMedia import SolveMedia
from ..internal.misc import json
from ..internal.SimpleHoster import SimpleHoster


class FikperCom(SimpleHoster):
__name__ = "FikperCom"
__type__ = "hoster"
__version__ = "0.01"
__version__ = "0.03"
__status__ = "testing"

__pattern__ = r"https?://fikper\.com/(?P<ID>\w+)"
Expand All @@ -28,7 +28,7 @@ class FikperCom(SimpleHoster):
__license__ = "GPLv3"
__authors__ = [("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")]

HCAPTCHA_KEY = "ddd70c6f-e4cb-45e2-9374-171fbc0d4137"
SOLVEMEDIA_KEY = "U0PGYjYQo61wWfWxQ43vpsJrUQSpCiuY"
API_URL = "https://sapi.fikper.com/"

DIRECT_LINK = False
Expand Down Expand Up @@ -73,15 +73,16 @@ def handle_free(self, pyfile):
)
self.restart(self._("Download limit exceeded"))

self.captcha = HCaptcha(pyfile)
self.captcha = SolveMedia(pyfile)
self.set_wait(self.info["delay_dime"] / 1000)
response = self.captcha.challenge(self.HCAPTCHA_KEY)
response, challenge = self.captcha.challenge(self.SOLVEMEDIA_KEY)
self.wait()
json_data = self.api_request(
"",
fileHashName=self.info["pattern"]["ID"],
downloadToken=self.info["download_token"],
recaptcha=response,
captchaValue=response,
challenge=challenge
)
if "directLink" in json_data:
self.link = json_data["directLink"]
Expand Down

0 comments on commit eb8a921

Please sign in to comment.