Pyload: Rapidgator accounts failing to log in

Created on 13 Apr 2016  路  4Comments  路  Source: pyload/pyload

The account is definitely a valid premium as I just logged in on the website. This just started yesterday. It has been working fine for at least a month.

13.04.2016 06:39:59 DEBUG Redirected import module.plugins.accounts.RapidgatorNet -> userplugins.accounts.RapidgatorNet
335 13.04.2016 06:39:59 DEBUG Redirected import module.plugins.internal.Account -> userplugins.internal.Account
336 13.04.2016 06:39:59 INFO ACCOUNT RapidgatorNet: Adding user [email protected]...
337 13.04.2016 06:39:59 DEBUG ACCOUNT RapidgatorNet: Reached login timeout for user [email protected]
338 13.04.2016 06:39:59 INFO ACCOUNT RapidgatorNet: Login user [email protected]...
339 13.04.2016 06:39:59 DEBUG ACCOUNT RapidgatorNet: LOAD URL http://rapidgator.net/api/user/login | redirect=True | decode=True | cookies=True | get={} | req=None | just_header=False | post={'username': 'artdog@_.com', 'password': '*_**'} | ref=True | multipart=False
340 13.04.2016 06:40:00 DEBUG ACCOUNT RapidgatorNet: API:LOGIN | {"response":{"session_id":"g69hmv9h2h05ft9neituieeqi1","expire_date":1464322607,"traffic_left":"3081059221915"},"response_status":200,"response_details":null}
341 13.04.2016 06:40:00 ERROR ACCOUNT RapidgatorNet: reset_in
342 13.04.2016 06:40:00 ERROR ACCOUNT RapidgatorNet: Could not login user [email protected] | Login handshake has failed

plugin bug

All 4 comments

@artdog Can you try this version?

# -*- coding: utf-8 -*-

import urlparse

from module.plugins.internal.Account import Account
from module.plugins.internal.misc import json


class RapidgatorNet(Account):
    __name__    = "RapidgatorNet"
    __type__    = "account"
    __version__ = "0.20"
    __status__  = "testing"

    __description__ = """Rapidgator.net account plugin"""
    __license__     = "GPLv3"
    __authors__     = [("zoidberg",  "[email protected]"       ),
                       ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")]


    TUNE_TIMEOUT = False

    API_URL = "http://rapidgator.net/api/user/"


    def grab_info(self, user, password, data):
        validuntil  = None
        trafficleft = None
        premium     = False
        sid         = None

        try:
            sid = data.get('sid', None)

            html = self.load(urlparse.urljoin(self.API_URL, "info"),
                             get={'sid': sid})

            self.log_debug("API:USERINFO", html)

            json_data = json.loads(html)

            if json_data['response_status'] == 200:
                validuntil  = json_data['response']['expire_date']
                trafficleft = float(json_data['response']['traffic_left']) / 1024  #@TODO: Remove `/ 1024` in 0.4.10
                premium     = True

            else:
                self.log_error(json_data['response_details'])

        except Exception, e:
            self.log_error(e, trace=True)

        return {'validuntil' : validuntil,
                'trafficleft': trafficleft,
                'premium'    : premium,
                'sid'        : sid}


    def signin(self, user, password, data):
        try:
            html = self.load(urlparse.urljoin(self.API_URL, "login"),
                             post={'username': user,
                                   'password': password})

            self.log_debug("API:LOGIN", html)

            json_data = json.loads(html)

            if json_data['response_status'] == 200:
                data['sid'] = str(json_data['response']['session_id'])

                if 'reset_in' in json_data['response']:
                    self.timeout = float(json_data['response']['reset_in'])
                    self.TUNE_TIMEOUT = False

                else:
                    self.TUNE_TIMEOUT = True

                return

            else:
                self.log_error(json_data['response_details'])

        except Exception, e:
            self.log_error(e, trace=True)

        self.fail_login()

I had the same problem, I have modified the file pyload/module/plugins/accounts/RapidgatorNet.py with the code above and now it's working again for me...
Thank you so much

Thank you!

Works for me:

# -*- coding: utf-8 -*-

import urlparse

from module.plugins.internal.Account import Account
from module.plugins.internal.misc import json


class RapidgatorNet(Account):
    __name__ = "RapidgatorNet"
    __type__ = "account"
    __version__ = "0.24"
    __status__ = "testing"

    __pyload_version__ = "0.5"

    __description__ = """Rapidgator.net account plugin"""
    __license__ = "GPLv3"
    __authors__ = [
        ("zoidberg", "[email protected]"),
        ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com"),
    ]

    TUNE_TIMEOUT = False

    API_URL = "https://rapidgator.net/api/user/"

    def api_response(self, method, **kwargs):
        json_data = self.load(self.API_URL + method, get=kwargs)
        return json.loads(json_data)

    def grab_info(self, user, password, data):
        validuntil = None
        trafficleft = None
        premium = False

        try:
            json_data = self.api_response("info", sid=data["sid"])

            if json_data["response_status"] == 200:
                validuntil = json_data["response"]["expire_date"]
                # TODO: Remove `>> 10` in 0.6.x
                #trafficleft = float(json_data["response"]["traffic_left"]) >> 10
                trafficleft = float(json_data['response']['traffic_left']) / 1024
                premium = True

            else:
                self.log_error(json_data["response_details"])

        except Exception as exc:
            self.log_error(
                exc, exc_info=self.pyload.debug > 1, stack_info=self.pyload.debug > 2
            )

        return {
            "validuntil": validuntil,
            "trafficleft": trafficleft,
            "premium": premium,
        }

    def signin(self, user, password, data):
        try:
            json_data = self.api_response("login", username=user, password=password)

            if json_data["response_status"] == 200:
                data["sid"] = str(json_data["response"]["session_id"])

                if "reset_in" in json_data["response"]:
                    self.timeout = float(json_data["response"]["reset_in"])
                    self.TUNE_TIMEOUT = False

                else:
                    self.TUNE_TIMEOUT = True

                return

            else:
                self.log_error(json_data["response_details"])

        except Exception as exc:
            self.log_error(
                exc, exc_info=self.pyload.debug > 1, stack_info=self.pyload.debug > 2
            )

        self.fail_login()
Was this page helpful?
0 / 5 - 0 ratings

Related issues

poste5 picture poste5  路  5Comments

zml71 picture zml71  路  6Comments

somerandom48 picture somerandom48  路  4Comments

Vesanius picture Vesanius  路  5Comments

Ryan747800B picture Ryan747800B  路  6Comments