Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed.cd changed their login procedure #348

Open
jwaterwo opened this issue Apr 25, 2020 · 5 comments
Open

Speed.cd changed their login procedure #348

jwaterwo opened this issue Apr 25, 2020 · 5 comments
Labels

Comments

@jwaterwo
Copy link

The speed.cd provider is returning a 503 when attempting to login. It appears that we are hitting http://speed.cd/takeloign.php, which no longer exists. The new address appears to be http://speed.cd/checkpoint/

@jwaterwo
Copy link
Author

    198     def _doLogin(self):
    199         login_params = {
    200             'username': sickbeard.SPEED_USERNAME,
    201             'password': sickbeard.SPEED_PASSWORD
    202         }
    203 
    204         self.session = requests.Session()
    205         logger.log("[{}] Attempting to Login".format(self.name))
    206 
    207         try:
    208             response = self.session.post("{}takelogin.php".format(self.url), data=login_params, timeout=30, verify=False)

@junalmeida
Copy link
Owner

Hi, I can accept pull requests :)

@junalmeida junalmeida added the bug label Apr 25, 2020
@jwaterwo
Copy link
Author

{"er":0,"Fs":[["DOM",[".login",["last"],["addClass","animate slideOutNext"],["wait",300],["toggleClass","Hidden animate slideOutNext"],["after","<form class=\"login pwd animate slideInNext\" method=\"POST\" action=\"\/checkpoint\/\">
    <h1>
        <div class=\"bkBtn\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\">
                <path fill=\"#404040\" d=\"M18 11.58v.84H7.62l3.92 3.93-.6.6L6 12l4.94-4.94.6.59-3.92 3.93z\"\ />
                <path fill=\"#404040\" d=\"M10.94 7.06l.6.59-3.92 3.93H18v.84H7.62l3.92 3.93-.6.6L6 12l4.94-4.94m0-.14l-.07.07-4.94 4.94-.07.07.07.07 4.94 4.94.07.07.07-.06.6-.6.07-.07-.07-.07-3.75-3.76H18.1v-1.04H7.86l3.75-3.76.07-.07-.07-.07-.6-.6-.07-.07z\"\ />
                <\ /svg>
                    <\ /div>Hello USERNAME<\ /h1>
                            <div class=\"uiIn\"><input type=\"password\" name=\"pwd\" placeholder=\" \"> <span class=\"ph\">Password<\ /span><span class=\"hint\">Incorrect account or password.<\ /span>
                                                <\ /div>
                                                    <div class=\"bbAr\"><input type=\"submit\" class=\"uiBtn\" value=\"Sign In\">
                                                        <\ /div>
                                                            <div id=\"botCheck\">
                                                                <\ /div>
                                                                    <div class=\"subOpt\"><a href=\"\/checkpoint\/recovery\">Forgot Password?<\ /a><a href=\"\/checkpoint\/signup\">Sign Up<\ /a>
                                                                                        <\ /div><input name=\"a\" value=\"joI3Hq9emx7X1GrpHA3nUoifpWE0TMsXacsGVqQLt7gG0Rm8wtpOBaz6Dcb1M0%2F4vPk35DYRx9%2B%2FmSw2kOYfoNDVSspjGOLjL0B1kRi3YnMHSCkx\" type=\"hidden\">
                                                                                            <\ /form>"],["next"],["wait",300],["removeClass","animate slideInNext"],["find",".uiIn input"],["get",0],["focus"]]]]}

@jwaterwo
Copy link
Author

I'm not smart enough to figure this one out. lol.

@jwaterwo
Copy link
Author

jwaterwo commented Apr 27, 2020

slight workaround, put your username and rss passkey into the provider file. This will keep your cache updated with the newest torrents from speed.cd. Won't work for going through backlog though.

diff --git a/sickbeard/providers/speed.py b/sickbeard/providers/speed.py
index cd555e9..09dfa71 100644
--- a/sickbeard/providers/speed.py
+++ b/sickbeard/providers/speed.py
@@ -264,21 +264,10 @@ class SpeedProvider(generic.TorrentProvider):
             ),
             logger.DEBUG
         )
-        try:
-            self.rss_uid, self.rss_passkey = re.findall(
-                r'name=\"user\" value=\"(.*)\" />.*?name=\"passkey\" value=\"([0-9A-Fa-f]{32})\"',
-                self.getURL(
-                    '{}rss.php'.format(self.url)
-                )
-            )[0]
-        except:
-            logger.log("[{}] {} Failed to scrape authentication parameters for rss.".format(
-                    self.name,
-                    self.funcName()
-                ),
-                logger.ERROR
-            )
-            return False
+
+        self.rss_uid = "USERNAME"
+        self.rss_passkey = "PASSKEY"
 
         if not self.rss_uid:
             logger.log("[{}] {} Can't extract uid from rss authentication scrape.".format(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants