logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Toongielen  
#1 Posted : Friday, May 19, 2017 9:55:32 PM(UTC)
Toongielen

Rank: Newbie

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 8
Location: Balen, Belgium

Thanks: 3 times
Hi there,

i have e problem by convert a html page in a csv file.

what i have is this : http://www.trendyfm.be/rup/playlist.html

this page shows the track that is playing and the track that you missed or the next track.

i want to import this as a data source on vmix.

now i make a excel that do the conversion but this is a bad solution and i need to restart it after 10 min.

is there anyone that can help pleas ?

(sorry for my english but i try to do my best)

my stream : http://ssl.trendyfm.be/

thx !!
Video Dave  
#2 Posted : Saturday, May 20, 2017 2:07:26 AM(UTC)
Video Dave

Rank: Advanced Member

Groups: Registered
Joined: 6/4/2014(UTC)
Posts: 81
Man
Location: USA

Thanks: 40 times
Was thanked: 9 time(s) in 9 post(s)
What software do you use for your station? I ask because my system generates an xlm file that I use in vMix as a data source.
Gielentoon  
#3 Posted : Saturday, May 20, 2017 3:49:56 AM(UTC)
Gielentoon

Rank: Newbie

Groups: Registered
Joined: 5/20/2017(UTC)
Posts: 3
Location: Belgium

Hi ,

Thx for your reply.

We are using radiohost

And the generator of the html page is radiohost publischer .

Link : https://www.marcbogaert.be/rhpublisher


rudyengels  
#4 Posted : Saturday, May 20, 2017 4:03:18 AM(UTC)
rudyengels

Rank: Advanced Member

Groups: Registered
Joined: 2/16/2017(UTC)
Posts: 125
Man
Belgium

Thanks: 25 times
Was thanked: 25 time(s) in 18 post(s)
Hi,

I see that in Radiohost Publisher there's an Output format (HTML is now selected).

Do you have the option to change this in XML? If so you can use that as a data source.
Toongielen  
#5 Posted : Friday, May 26, 2017 2:58:03 PM(UTC)
Toongielen

Rank: Newbie

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 8
Location: Balen, Belgium

Thanks: 3 times
Hi ,

i just checked the output formats but i have only the option to use : html or text ...
DWAM  
#6 Posted : Friday, May 26, 2017 3:05:16 PM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Hi

Text would be a better option over HTML for use with datasource. Worth a try btw...

Guillaume
wtmuradiotv  
#7 Posted : Sunday, June 11, 2017 11:04:19 AM(UTC)
wtmuradiotv

Rank: Advanced Member

Groups: Registered
Joined: 7/4/2015(UTC)
Posts: 65
Man
United States

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Are you trying to show the artist and song info on whats playing ?
Gielentoon  
#8 Posted : Monday, June 12, 2017 9:27:53 AM(UTC)
Gielentoon

Rank: Newbie

Groups: Registered
Joined: 5/20/2017(UTC)
Posts: 3
Location: Belgium

Jes !
I have the data , only need to vieuw it in vmix ...
wtmuradiotv  
#9 Posted : Sunday, June 18, 2017 2:33:54 PM(UTC)
wtmuradiotv

Rank: Advanced Member

Groups: Registered
Joined: 7/4/2015(UTC)
Posts: 65
Man
United States

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Once you have the data in there you should be able to pull it up via the preview buttons you have to assign it to a channel 1234
Toongielen  
#10 Posted : Sunday, June 18, 2017 2:50:18 PM(UTC)
Toongielen

Rank: Newbie

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 8
Location: Balen, Belgium

Thanks: 3 times
jes thats correct.
but my problem is that my data is HTML.

and i now concert my that data with a excell sheet with macro .

i'm looking for a easy way to do this ;-)
doggy  
#11 Posted : Sunday, June 18, 2017 3:16:34 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
You mentioned you have to option to export your data to TXT file, use that !
Gielentoon  
#12 Posted : Sunday, June 18, 2017 8:31:17 PM(UTC)
Gielentoon

Rank: Newbie

Groups: Registered
Joined: 5/20/2017(UTC)
Posts: 3
Location: Belgium

Jes , but i have just 1 type of output that i can use .
Now i have html because wee need this for our website .
Alsow the txt file have not the option to customise with a font.
Thats the reason i'm looking for a tool to that reads the html file and convert it .

Sorry for that
dark_ata  
#13 Posted : Monday, June 19, 2017 10:06:18 AM(UTC)
dark_ata

Rank: Advanced Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 129
Location: Tenerife

Thanks: 11 times
Was thanked: 18 time(s) in 13 post(s)
This code should convert the html to xml, you can load in vmix using //xml //previous for the last song when is available, //xml //current for the current and //xml //next for the next if is available

Code:
<?php
$text = file_get_contents('http://www.trendyfm.be/rup/playlist.html');
$previus="<b>Net gemist:";
$current="<b>Nu on-air:";
$next="<b>Next:";
$sxe = new SimpleXMLElement('<xml/>');
$pos_prev=strpos($text, $previus);
if($pos_prev!=false){
$text_prev=substr(strchr($text,"#911419"),13);
$name_prev=substr($text_prev,0,strpos($text_prev,"<"));
$song_prev=substr(strchr($text_prev,"- </b><b>"),10);
$song_prev=substr($song_prev,0,strpos($song_prev,"<"));
$previ = $sxe->addChild('previous');
$previ->addChild("Artist", $name_prev);
$previ->addChild("Song", $song_prev);

}
$pos_current=strpos($text, $current);
if($pos_current!=false){
$text_cu=strchr($text,$current);
$text_current=substr(strchr($text_cu,"#911419"),13);
$name_current=substr($text_current,0,strpos($text_current,"<"));
$song_current=substr(strchr($text_current,"- </b><b>"),9);
$song_current=substr($song_current,0,strpos($song_current,"<"));
$curr = $sxe->addChild('current');
$curr->addChild("Artist", $name_current);
$curr->addChild("Song", $song_current);
}
$pos_next=strpos($text, $next);
if($pos_next!=false){
$text_ne=strchr($text,$next);
$text_next=substr(strchr($text_ne,"#911419"),13);
$name_next=substr($text_next,0,strpos($text_next,"<"));
$song_next=substr(strchr($text_next,"- </b><b>"),9);
$song_next=substr($song_next,0,strpos($song_next,"<"));
$nex = $sxe->addChild('next');
$nex->addChild("Artist", $name_next);
$nex->addChild("Song", $song_next);
}
echo $sxe->asXML();
?>
thanks 1 user thanked dark_ata for this useful post.
Toongielen on 8/30/2017(UTC)
wtmuradiotv  
#14 Posted : Monday, August 28, 2017 8:48:18 PM(UTC)
wtmuradiotv

Rank: Advanced Member

Groups: Registered
Joined: 7/4/2015(UTC)
Posts: 65
Man
United States

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Gielentoon wrote:
Jes !
I have the data , only need to vieuw it in vmix ...




Try this and watch it ....I use it and it works fine https://www.youtube.com/watch?v=1MCRFf8LZkk&t=12s
Toongielen  
#15 Posted : Wednesday, August 30, 2017 1:37:07 PM(UTC)
Toongielen

Rank: Newbie

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 8
Location: Balen, Belgium

Thanks: 3 times
dark_ata wrote:
This code should convert the html to xml, you can load in vmix using //xml //previous for the last song when is available, //xml //current for the current and //xml //next for the next if is available

Code:
<?php
$text = file_get_contents('http://www.trendyfm.be/rup/playlist.html');
$previus="<b>Net gemist:";
$current="<b>Nu on-air:";
$next="<b>Next:";
$sxe = new SimpleXMLElement('<xml/>');
$pos_prev=strpos($text, $previus);
if($pos_prev!=false){
$text_prev=substr(strchr($text,"#911419"),13);
$name_prev=substr($text_prev,0,strpos($text_prev,"<"));
$song_prev=substr(strchr($text_prev,"- </b><b>"),10);
$song_prev=substr($song_prev,0,strpos($song_prev,"<"));
$previ = $sxe->addChild('previous');
$previ->addChild("Artist", $name_prev);
$previ->addChild("Song", $song_prev);

}
$pos_current=strpos($text, $current);
if($pos_current!=false){
$text_cu=strchr($text,$current);
$text_current=substr(strchr($text_cu,"#911419"),13);
$name_current=substr($text_current,0,strpos($text_current,"<"));
$song_current=substr(strchr($text_current,"- </b><b>"),9);
$song_current=substr($song_current,0,strpos($song_current,"<"));
$curr = $sxe->addChild('current');
$curr->addChild("Artist", $name_current);
$curr->addChild("Song", $song_current);
}
$pos_next=strpos($text, $next);
if($pos_next!=false){
$text_ne=strchr($text,$next);
$text_next=substr(strchr($text_ne,"#911419"),13);
$name_next=substr($text_next,0,strpos($text_next,"<"));
$song_next=substr(strchr($text_next,"- </b><b>"),9);
$song_next=substr($song_next,0,strpos($song_next,"<"));
$nex = $sxe->addChild('next');
$nex->addChild("Artist", $name_next);
$nex->addChild("Song", $song_next);
}
echo $sxe->asXML();
?>


Hej Dark_ata

thx for this !!

YOU ARE THE BEST !!

Thx !!

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.