diff options
-rwxr-xr-x | tk_bbl.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tk_bbl.py b/tk_bbl.py new file mode 100755 index 0000000..f7ed30f --- /dev/null +++ b/tk_bbl.py @@ -0,0 +1,25 @@ +import time, mechanize, re, random + +browser = mechanize.Browser() +browser.set_handle_robots(False) +browser.set_handle_refresh(False) +browser.addheaders = [('User-agent', 'Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0')] + +rand = random.randrange(1000000000,9999999999) +time = int(time.time()) +state = str(time) + str(rand); + +browser.open("https://www.telekombasketball.de") +browser.open("https://accounts.login.idm.telekom.com/oauth2/auth?response_type=code&client_id=10LIVESAM30000004901BEKOBBL0000000000000&scope=openid&redirect_uri=http:%2F%2Fwww.telekombasketball.de%2Foauth.php%3Frequest%3Dlogin%26headto%3Dhttp:%2F%2Fwww.telekombasketball.de%2F&state="+state+"&claims=%7B%22id_token%22%3A%7B%22urn%3Atelekom.com%3Aall%22%3Anull%7D%7D") + +user = "" +password = "" +browser.select_form(name="login") +browser.form['pw_usr'] = user +browser.form['pw_pwd'] = password +browser.submit() + +browser.open("https://www.telekombasketball.de/videoplayer/player.php?play=" + str(2731)) +response = browser.response().read() +mobileUrl = re.search('mobileUrl: \"(.*?)\"', response).group(1) +print mobileUrl |