Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#51 Le 16/11/2015, à 06:17

general alcazar

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

@k3c a écrit :

Tu te rends sur le site IT à :
f=3&t=271&start=70#p40218

Euh, c'est ou ça ?

Hors ligne

#52 Le 19/11/2015, à 01:34

11gjm

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

Bonjour ,

http://streameo.altervista.org/forum/viewtopic.php?

Il faut s'enregistrer pour pouvoir lire , certains textes .

D'autres part Wilm*** est malgré tout accessible avec une IP suisse ou VPN .

La situation est un peu confuse , il y a plusieurs possibilités pour voir les chaines ,
à partir d'un diffuseur situé en Suisse .

Cordialement .

Hors ligne

#53 Le 21/11/2015, à 14:21

Sciensous

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

avec wilm**, ça a marché, mais ça ne marche plus avec livestreamer +adresse ip suisse sad
c'était pourtant pratique pour enregistrer et visionner plus tard une émission/film


antiX 19 et 21 et Ubuntu 20.04 et 22.04
( sous LXDE et gnome-shell )

Hors ligne

#54 Le 22/11/2015, à 15:15

11gjm

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

Bonjour ,

Cela fonctionne , encore , avec un proxy suisse ou vpn .

Cordialement .

Hors ligne

#55 Le 22/11/2015, à 17:50

Sciensous

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

le soucis est de trouver un bon proxy suisse qui fonctionne;
j'en suis comme à ton post 45 et 48
(livestreamer+http-proxy donne un timeout de 20s)

si quelqu'un peut détailler la méthode avec wilmaa, je suis preneur smile


antiX 19 et 21 et Ubuntu 20.04 et 22.04
( sous LXDE et gnome-shell )

Hors ligne

#56 Le 23/11/2015, à 07:15

k3c

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

Je laisse tomber, trouver un proxy canadien ou british, aucun problème, mais un proxy suisse, de catégorie Elite (ou HIA pour high availability), qui est en Suisse et fonctionne, c'est perdu d'avance


Archlinux sur Xiaomi Air 13

Hors ligne

#57 Le 23/11/2015, à 20:17

Sciensous

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

ça confirme mes soupçons, dommage

merci quand même k3c
wink


antiX 19 et 21 et Ubuntu 20.04 et 22.04
( sous LXDE et gnome-shell )

Hors ligne

#58 Le 24/11/2015, à 17:56

k3c

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

ce qui marche, c'est se créer un compte sur
http://www.teleboy.ch/login
(faut juste un email)

puis enregistrer
watchteleboy.php
à partir de
http://darbycrash.eu/PHP/

Puis mettre ton identifiant et mot de passe de ton compte teleboy dans les 2 lignes

$username = "insert_your_username";
$password = "insert_your_password";

du watchteleboy.php et watchteleboylist.php

Récupérer

le watch_teleboy_list.php et le lancer une fois pour créer les fichiers m3u8

puis lancer

php watchteleboy.php

BBC, ITV, chaines allemandes...

exemple

$ php watch_teleboy_v2.php 


WatchTeleboy by Darby_Crash


Channels list:

0) 3+HD            1) 3satHD          2) 4+HD            3) 5+
4) AlJazeeraEn     5) AnixeHD         6) ARDHD           7) ArteFrHD
8) ArteHD          9) BBC1HD          10) BBC2HD         11) BBC3
12) BBCwn          13) BRHD           14) Canal9         15) CanalAlpha
16) Canale5HD      17) Chan4          18) CHTVHD         19) Cielo
20) CNBC           21) CNN            22) D8             23) DeluxeMusic
24) DisneyChannel  25) DMAX           26) EuNews-e       27) EuNews-f
28) EuNews-i       29) EuNews         30) EuSp           31) Film4
32) Fr2HD          33) Fr3            34) Fr4            35) Fr5
36) Fr24           37) FrO            38) Gulli          39) Italia1HD
40) ITV1HD         41) ITV2           42) ITV3           43) Joiz
44) Kabel1chHD     45) KiKaHD         46) LA7            47) LaTele
48) LemanBleu      49) M6HD           50) MDR            51) MTVit
52) MTV            53) n-tv           54) NDRHD          55) Nick
56) Nick           57) ORF1HD         58) ORF2HD         59) PHOENIXHD
60) Pro7chHD       61) Pro7Maxx       62) Puls8          63) Rai1
64) Rai2           65) Rai3           66) RaiNews24      67) RaiSport1
68) Rete4HD        69) RSILA1HD       70) RSILA2HD       71) RTL2chHD
72) RTL1025        73) RTLchHD        74) RTLNitroHD     75) RTPi
76) RTS1HD         77) RTS2HD         78) S-RTLchHD      79) S1
80) Sat.1chHD      81) ServusTVHD     82) sixxHD         83) Sport1
84) SRF1HD         85) SRF2HD         86) SRFi           87) StarTV
88) SWR-BW-HD      89) TBasel         90) TBrn          91) Tele1
92) Tele5          93) TeleBielingue  94) TeleM1         95) TeleTicino
96) TeleTop        97) TF1HD          98) TRT1           99) TSO
100) TV5           101) TV24          102) TVEi          103) TVO
104) TZri         105) VIVA          106) VOXchHD       107) W9
108) WDRHD         109) ZDF-Info      110) zdf.kultur    111) ZDFHD
112) ZDFneo        
Choose a channel (x=exit): 

Dernière modification par k3c (Le 25/11/2015, à 10:09)


Archlinux sur Xiaomi Air 13

Hors ligne

#59 Le 26/11/2015, à 14:27

Sciensous

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

merci pour ces explications; mais le sort est contre moi sad

le lancement de watchteleboylist.php s'arrete à curl_init($url) alors que la page s'affiche bien sur un navigateur
... ??? ...


antiX 19 et 21 et Ubuntu 20.04 et 22.04
( sous LXDE et gnome-shell )

Hors ligne

#60 Le 26/11/2015, à 15:44

melixgaro

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

à Sciensous
au hasard, as-tu bien installé php5-curl ?
dans le profil teleboy, il me semble qu'il faut renseigner un âge sinon l'accès aux chaînes n'est pas possible.

en tout cas merci à k3c d'avoir signaler l'existence de cette solution et une description rapide de sa mise en œuvre

édition : grammaire

Dernière modification par melixgaro (Le 27/11/2015, à 13:45)


Linux depuis ~2007. Xubuntu seulement.

Hors ligne

#61 Le 26/11/2015, à 16:27

k3c

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

pour tous les scripts en php venant de http://darbycrash.eu/PHP/
il faut php5-cli et php5-curl

Dernière modification par k3c (Le 26/11/2015, à 16:35)


Archlinux sur Xiaomi Air 13

Hors ligne

#62 Le 27/11/2015, à 12:55

Sciensous

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

melixgaro et k3c merci, c'était bien php5-curl qui manquait.
Tout fonctionne maintenant
smile


antiX 19 et 21 et Ubuntu 20.04 et 22.04
( sous LXDE et gnome-shell )

Hors ligne

#63 Le 27/11/2015, à 14:19

k3c

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

une version pour enregistrer, par exemple

php watch_teleboy_v2_batch.php 9 33

va créer le fichier BBC1HD_dateheureminutessecondes.ts (9 pour la BBC) et enregistrer pendant 33 secondes

le code (remplacer user_teleboy et mdp_teleboy par vos identifiants)

<?php
/*
	Filename: WatchTeleboy.php.
	Copyright 2013/2015.
	Author:   Darby_Crash.
	Email:    kihol@inwind.it

	This Program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3, or (at your option)
	any later version.

	This Program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

$version = "2.6.2";

$username = "user_teleboy";
$password = "mdp_teleboy";

error_reporting(0);
strncasecmp(php_uname('s'), "Win", 3) == 0 ? $windows = true : $windows = false;
if ($windows) {
	if (file_exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe")) {
		$vlc = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";
	} else if (file_exists("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe")) {
		$vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe";
	} else {
		$vlc = "C:\\Programmi\\VideoLAN\\VLC\\vlc.exe";
	}
} else {
	$vlc = "vlc";
	$out = "2>/dev/null";
}
$ip = "85.".rand(0,7).".".rand(0,255).".".rand(0,255);
$api_key = 'f0e7bdfb822fa88c0c7a13f752a7e8d5c3757a13f757a13f9c0c7a13f7dfb822';
function get($url,$referer,$h){
	global $api_key, $ssid, $ip;
	if ( $h == '1' ) {
		unset($headers);
		$headers[] = "x-teleboy-apikey: $api_key";
		$headers[] = "x-teleboy-session: $ssid";
		$headers[] = "X-Forwarded-For: $ip";
	}
	$ch = curl_init ($url);
	curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16');
	curl_setopt ($ch, CURLOPT_HEADER, 0);
	curl_setopt ($ch, CURLOPT_REFERER, $referer);
	curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	$res = curl_exec ($ch);
	curl_close($ch);
	return $res;
}

function post($url,$data,$referer){
	$ch = curl_init ($url);
	curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16');
	curl_setopt ($ch, CURLOPT_HEADER, 1);
	curl_setopt ($ch, CURLOPT_REFERER, $referer);
	curl_setopt ($ch, CURLOPT_POST, 1);
	curl_setopt ($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded;charset=UTF-8","Connection: Keep-Alive","Content-Length: ".strlen($data)));
	curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	$res = curl_exec($ch);
	curl_close($ch);
	return $res;
}
echo "\r\n\r\nWatchTeleboy by Darby_Crash\r\n\r\n";
get('http://t.teleboy.ch/en/tv/live_tv.php','');
post('http://t.teleboy.ch/login_check',"login=$username&password=$password&x=14&y=7&keep_login=1",'http://t.teleboy.ch/en/tv/live_tv.php');
$data = get('http://t.teleboy.ch/en/tv/live_tv.php','http://t.teleboy.ch/en/tv/live_tv.php');
$check = file_get_contents("cookies.txt");
if (preg_match("/cinergy_auth/", $check)) {
	preg_match("/cinergy_s\t(.*?)\s/", $check, $ssid);
	$ssid = $ssid[1];
	preg_match("/\s+id:\s*(.*?),/s", $data, $uid);
	$uid = $uid[1];
} else {
	unlink('cookies.txt');
	die("\r\nLogin failed! Check your account data!\r\n\r\n");
}
preg_match_all('|<td\sclass="station">.*?title="(.*?)".*?data-play-live="\d+/\d+".*?data-stationid="(\d+)"|s', $data, $names);
$lista = array();
for ($i=0;$i<count($names[1]);$i++) {
	$lista[] = $names[1][$i]."^".$names[2][$i];
}
natcasesort($lista);
$list = array_values($lista);

	echo "\r\nChannels list:\r\n\r\n";
	for ($i=0;$i<count($list);$i++){
		$tmp = explode("^", $list[$i]);
		echo "$i) ".$tmp[0].((($i + 1)% 4 == 0) ? "\r\n" : str_repeat(' ', 17 - strlen($tmp[0].$i)));
	}
	echo "\r\nChoose a channel (x=exit): ";
	$inp = $argv[1];
	if ($inp >= count($list) || !preg_match("/[0-9xX]/", $inp)){
		echo "\r\nInvalid choice!\r\n";
		sleep(2);
		continue;
	} elseif ($inp == "x" || $inp == "X"){
		unlink("cookies.txt");
		die("\r\nKilled!\r\n\r\n");
	}
	$tmp = explode("^", $list[$inp]);
	$data = json_decode(get("http://tv.api.teleboy.ch/users/".$uid."/stream/live/".$tmp[1]."?alternative=false",'','1'), true);
	$url = $data["data"]["stream"]["url"];
	echo "\r\nPlaying ".$tmp[0]."...\r\n";
	$cmd = 'livestreamer -o \''.$tmp[0].'_'.date("YmdHis").'\'.ts --meta-title=\''.$tmp[0].'\' --file-caching=10000" --http-header "X-Forwarded-For='.$ip.'" "hlsvariant://'.$url.'" best';
        shell_exec($cmd." > /dev/null 2>/dev/null &");
	sleep($argv[2]);
	shell_exec('killall livestreamer');
?>

Dernière modification par k3c (Le 27/11/2015, à 15:13)


Archlinux sur Xiaomi Air 13

Hors ligne

#64 Le 03/01/2016, à 17:29

k3c

Re : [Tuto] Planifier l'enregistrement d'une TV européenne

petite modif pour enregistrer en donnant un nom

Exemple pour enregistrer la RTS1, une ligne dans la crontab avec une commande

/usr/bin/php /home/gg/watch_teleboy_v3_batch.php 76 9000 master_of_sex_s03e01-02

à une date donnée
va créer un fichier du type
RTS1HD_20160103172428_master_of_sex_s03e01-02.ts

Le code

<?php
/*
	Filename: WatchTeleboy.php.
	Copyright 2013/2015.
	Author:   Darby_Crash.
	Email:    kihol@inwind.it

	This Program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3, or (at your option)
	any later version.

	This Program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

$version = "2.6.2";

$username = "k3c";
$password = "aizuwa617";

error_reporting(0);
strncasecmp(php_uname('s'), "Win", 3) == 0 ? $windows = true : $windows = false;
if ($windows) {
	if (file_exists("C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe")) {
		$vlc = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe";
	} else if (file_exists("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe")) {
		$vlc = "C:\\Program Files\\VideoLAN\\VLC\\vlc.exe";
	} else {
		$vlc = "C:\\Programmi\\VideoLAN\\VLC\\vlc.exe";
	}
} else {
	$vlc = "vlc";
	$out = "2>/dev/null";
}
$ip = "85.".rand(0,7).".".rand(0,255).".".rand(0,255);
$api_key = 'f0e7bdfb822fa88c0c7a13f752a7e8d5c3757a13f757a13f9c0c7a13f7dfb822';
function get($url,$referer,$h){
	global $api_key, $ssid, $ip;
	if ( $h == '1' ) {
		unset($headers);
		$headers[] = "x-teleboy-apikey: $api_key";
		$headers[] = "x-teleboy-session: $ssid";
		$headers[] = "X-Forwarded-For: $ip";
	}
	$ch = curl_init ($url);
	curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16');
	curl_setopt ($ch, CURLOPT_HEADER, 0);
	curl_setopt ($ch, CURLOPT_REFERER, $referer);
	curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	$res = curl_exec ($ch);
	curl_close($ch);
	return $res;
}

function post($url,$data,$referer){
	$ch = curl_init ($url);
	curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16');
	curl_setopt ($ch, CURLOPT_HEADER, 1);
	curl_setopt ($ch, CURLOPT_REFERER, $referer);
	curl_setopt ($ch, CURLOPT_POST, 1);
	curl_setopt ($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded;charset=UTF-8","Connection: Keep-Alive","Content-Length: ".strlen($data)));
	curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
	curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	$res = curl_exec($ch);
	curl_close($ch);
	return $res;
}
echo "\r\n\r\nWatchTeleboy by Darby_Crash\r\n\r\n";
get('http://t.teleboy.ch/en/tv/live_tv.php','');
post('http://t.teleboy.ch/login_check',"login=$username&password=$password&x=14&y=7&keep_login=1",'http://t.teleboy.ch/en/tv/live_tv.php');
$data = get('http://t.teleboy.ch/en/tv/live_tv.php','http://t.teleboy.ch/en/tv/live_tv.php');
$check = file_get_contents("cookies.txt");
if (preg_match("/cinergy_auth/", $check)) {
	preg_match("/cinergy_s\t(.*?)\s/", $check, $ssid);
	$ssid = $ssid[1];
	preg_match("/\s+id:\s*(.*?),/s", $data, $uid);
	$uid = $uid[1];
} else {
	unlink('cookies.txt');
	die("\r\nLogin failed! Check your account data!\r\n\r\n");
}
preg_match_all('|<td\sclass="station">.*?title="(.*?)".*?data-play-live="\d+/\d+".*?data-stationid="(\d+)"|s', $data, $names);
$lista = array();
for ($i=0;$i<count($names[1]);$i++) {
	$lista[] = $names[1][$i]."^".$names[2][$i];
}
natcasesort($lista);
$list = array_values($lista);

	echo "\r\nChannels list:\r\n\r\n";
	for ($i=0;$i<count($list);$i++){
		$tmp = explode("^", $list[$i]);
		echo "$i) ".$tmp[0].((($i + 1)% 4 == 0) ? "\r\n" : str_repeat(' ', 17 - strlen($tmp[0].$i)));
	}
	echo "\r\nChoose a channel (x=exit): ";
	$inp = $argv[1];
	if ($inp >= count($list) || !preg_match("/[0-9xX]/", $inp)){
		echo "\r\nInvalid choice!\r\n";
		sleep(2);
		continue;
	} elseif ($inp == "x" || $inp == "X"){
		unlink("cookies.txt");
		die("\r\nKilled!\r\n\r\n");
	}
	$tmp = explode("^", $list[$inp]);
	$data = json_decode(get("http://tv.api.teleboy.ch/users/".$uid."/stream/live/".$tmp[1]."?alternative=false",'','1'), true);
	$url = $data["data"]["stream"]["url"];
	echo "\r\nPlaying ".$tmp[0]."...\r\n";
#	$cmd = 'livestreamer -o  \''.$tmp[0].'_'.date("YmdHis").'\'.ts --player "\''.$vlc.'\' --meta-title=\''.$tmp[0].'\' --file-caching=10000" --http-header "X-Forwarded-For='.$ip.'" "hlsvariant://'.$url.'" best';
	$cmd = 'livestreamer -o  \''.$tmp[0].'_'.date("YmdHis").'_'.$argv[3].'\'.ts --player "\''.$vlc.'\' --meta-title=\''.$tmp[0].'\' --file-caching=10000" --http-header "X-Forwarded-For='.$ip.'" "hlsvariant://'.$url.'" best';
        shell_exec($cmd." > /dev/null 2>/dev/null &");
	sleep($argv[2]);
	shell_exec('killall livestreamer');
?>

Archlinux sur Xiaomi Air 13

Hors ligne