Created
February 25, 2015 22:58
-
-
Save aitormagan/41c9b044e0511184bf63 to your computer and use it in GitHub Desktop.
Script to retrieve the streaming URLs of Movistar TV channels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# Basic Variables | |
MIN_RANGE = 22000 | |
MAX_RANGE = 40000 | |
BASE_URL = 'http://B%d.cdn.telefonica.com/%d/%s_SUB.m3u8' | |
CHANNELS_IDS = ['NICK', 'DSNJR', '40TV', 'DSNYXD', 'COCINA', '24HORAS', 'INVITADO', 'FOX', | |
'AXN', 'CLL13', 'TNT', 'FOXCRIME', 'CSMO', 'AXNWHITE', 'PCMDY', 'SYFY', 'TCM', | |
'CPLUSLG', 'MOVFUTBOL', 'CPLUSCHP', 'NTLG', 'NATGEOWILD', 'CPLUS1'] | |
# Execution | |
for channel in CHANNELS_IDS: | |
for host_number in range(MIN_RANGE, MAX_RANGE): | |
url = BASE_URL % (host_number, host_number, channel) | |
try: | |
req = requests.get(url, timeout=30) | |
if req.status_code == 200 and 'chunklist' not in req.text: | |
print '%s: %s' % (channel, url) | |
break | |
except Exception as e: | |
pass |
Bueno bueno, el de F1 y el de MotoGP, sobre todo MotoGP, que la F1 es aburrida.
como se usa el script?
para cuando la nueva version ? o ya te hiciste amigo con los de la M ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gran trabajo.! Hace falta encontrar el ID del canal de Formula 1