[mythtv-users] Mythstream parsers

Paul Bender pebender at san.rr.com
Sun Apr 6 23:53:24 UTC 2008


Eric wrote:
> On 07 April 2008 00:53:30 Paul Bender wrote:
> 
> (...)
> 
>> I do not use the other parsers, but for youtube a minor change to the
>> youtube/vid.pl parser fixed it for me. Below is the fixed line. It
>> should be obvious which line it replaces. It appears that they added
>> more parameters, which broke the previous parsing. This parsing should
>> be somewhat more robust.
>>
>> if ( ($a, $b) = $data =~
>> /,\s*"video\_id":\s*"([^"]+)".*,\s*"t":\s*"([^"]+)"/)
> 
> Right on the mark, and more robust than the regexp I used in the parser 
> uploaded a few hours ago. Maybe I am a bit too conservative in my 
> regexping...

I am likely too liberal in mine. Either way, we can be sure that the 
next change made by youtube will break whatever one is created. 
Especially one that is arrogantly referred to as somewhat more robust.

> Aside from this regexp another change is required to make the youtube parser 
> fully functional: open vid_p.pl and change "youvid.pl" to "vid.pl". 
> 
> A heads up for this second issue was mailed to me a while ago by someone named 
> Paul Bender :)

I know that guy. I wouldn't trust his patches. ;)


More information about the mythtv-users mailing list