src/streamlink/plugins/liveedu.py
def login(self):
        """
        Attempt a login to LiveEdu.tv
        """
        email = self.get_option("email")
        password = self.get_option("password")

        if email and password:
            res = self.session.http.get(self.login_url)
            csrf_match = self.csrf_re.search(res.text)
            token = csrf_match and csrf_match.group(1)
            self.logger.debug("Attempting login as {0} (token={1})", email, token)

            res = self.session.http.post(self.login_url,
                            data=dict(login=email, password=password, csrfmiddlewaretoken=token),
                            allow_redirects=False,
                            raise_for_status=False,
                            headers={"Referer": self.login_url})

            if res.status_code != 302:
                self.logger.error("Failed to login to LiveEdu account: {0}", email)
def login(self):
        """
        Attempt a login to LiveEdu.tv
        """
        email = self.get_option("email")
        password = self.get_option("password")

        if email and password:
            res = self.session.http.get(self.login_url)
            csrf_match = self.csrf_re.search(res.text)
            token = csrf_match and csrf_match.group(1)
            self.logger.debug("Attempting login as {0} (token={1})", email, token)

            res = self.session.http.post(self.login_url,
                            data=dict(login=email, password=password, csrfmiddlewaretoken=token),
                            allow_redirects=False,
                            raise_for_status=False,
                            headers={"Referer": self.login_url})

            if res.status_code != 302:
                self.logger.error("Failed to login to LiveEdu account: {0}", email)
Attempt a login to LiveEdu.tv