NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 2 3 4 5 6 … 34 Next »
Special characters in an extra link

 
  • 0 Vote(s) - 0 Average
Special characters in an extra link
ballfam
Offline

Member

Australia
Posts: 132
Threads: 11
Joined: Jul 2020
#1
2024-08-11, 02:22 PM
Channel 9 Australia has updated their streams so that they require a tokenized encrypted stream that is specific to the 9now account. The idea is that you can't stream the channel unless you have a login. All good except that it leads to an excessively long HTML link with all kinds of special characters in. If I paste this link into streamlink on the command-line (and make sure I quote it); everything works fine and VLC pops up with the live Channel 9 stream, but if I try to add the link to an extra XML, quoted or not, I get a syntax error when I update the channels in nextPVR. The extra looks like this (I have excluded my user specific token)


Code:
<?xml version='1.0' encoding='utf-8'?>
<extras>
  <channel name="Seven" group="Sydney" tvg-id="mjh-seven-syd" x-tvg-url="https://i.mjh.nz/au/Sydney/epg.xml" id="mjh-seven-syd" tvg-chno="7">
    <command>streamlink</command>
    <args>--retry-streams 1 --retry-open 5 https://i.mjh.nz/seven-syd.m3u8 best -O</args>
    <icon>https://i.mjh.nz/.images/seven-syd.png</icon>
  </channel>
  <channel name="Channel 9 Alt" group="Sydney" tvg-id="mjh-channel-9-nsw">
    <command>streamlink</command>
    <args>https://csm-e-nineau1-eb.bln1.yospace.com/csm/extlive/nnaprd01,prod-simulcast-syd-ch9-hls-clearkey-r21.m3u8?pp=9now_live&iu=%2F133009657%2F9now%2Fweb%2Flive&yo.up=https%3A%2F%2F9now-livestreams-fhd-t.akamaized.net%2Ft%2Fprod%2Fsimulcast%2Fsyd%2Fch9%2Fhls%2Fclearkey%2Fr1%2F&url=https%3A%2F%2Fwww.9now.com.au%2Flive%2Fchannel-9&vid=live-ch9-syd&cmsid=2474123&yo.t.pf=8000&yo.ks=false&yo.pbr=false&yo.br=false&yo.ap=https%3A%2F%2Fp-9now-ys-v2.akamaized.net%2F&channel=channel-9&market=sydney&yo.eb.fb=&startOver=false&yo.pp=<TOKEN-HERE>&apid=b459bf03-332b-df6c-6993-28870b6513a6&device_id=82e78c3c-b36e-9f7f-f439-2615a622ed6d&deviceType=desktop&optout=0&telaria_tvid=&userAgentheader=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F127.0.0.0+Safari%2F537.36&oztam_session_id=6e3298bd-bd9b-4fdd-9fab-04e5341ddd68&vendorVersion=9now_web_1.4&yo.ac=true&yo.av=4&yo.lp=false&yo.lpa=dur best -O</args>
    <icon>https://imageresizer.static9.net.au/HtBnd8GsZ-0m6XU8owz7-XYATt4=/1280x0/vms-tv-images-prod.s3-ap-southeast-2.amazonaws.com%2F2015%2F11%2F11%2F9_Colour_RGB.png</icon>
  </channel>
  <channel name="Seven Alt" group="Sydney" tvg-id="mjh-seven-syd" x-tvg-url="https://i.mjh.nz/au/Sydney/epg.xml" id="mjh-seven-syd" tvg-chno="7">
    <command>streamlink</command>
    <args>--retry-streams 1 --retry-open 5 https://i.mjh.nz/seven-syd.m3u8 best -O</args>
    <icon>https://i.mjh.nz/.images/seven-syd.png</icon>
  </channel>
</extras>


Adding to NextPVR gives me:

Error in extra-autv.xml: An error occurred while parsing EntityName. Line 10, position 132.

It looks like NextPVR is complaining about the ampersand (&) character in the link. I have tried quoting it, and also dereferencing the ampersand with a backslash, but it doesn't help.

Any ideas how to fix this?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#2
2024-08-11, 02:36 PM (This post was last modified: 2024-08-12, 03:11 PM by mvallevand.)
Please post Extras support posts in the Extras sub forum it could help others.

Quoting is not encoding you would definitely need to xml encode special characters like the ampersand https://www.baeldung.com/xml-encode-special-characters

Code:
&
becomes
&amp;

Martin
ballfam
Offline

Member

Australia
Posts: 132
Threads: 11
Joined: Jul 2020
#3
2024-08-12, 02:23 PM
Thanks Martin. Let me give that a try.

I wasn't aware that there was a sub form for Extras, do you have the privs to move it?
ballfam
Offline

Member

Australia
Posts: 132
Threads: 11
Joined: Jul 2020
#4
2024-08-12, 02:41 PM
Yup, that fixed it.

In vi, I just did a global substitute of "&" with "&amp;" and problem is fixed. (for those who down't know vi magic, that is %s,&,&amp;,g)....I have no idea how to do this in Windows, except to install vi and do it in that (which is what I always do in Windows.....old habits)

Thanks Martin.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Extra - {channel} argument not working? blitz2kx 2 652 2024-06-11, 03:54 PM
Last Post: blitz2kx
  EPG with extra ballfam 23 2,875 2023-07-27, 10:03 PM
Last Post: ballfam
  Missing EPG entries - Control Characters Tugdwal 5 1,106 2022-10-11, 06:08 PM
Last Post: sub
  PlutoTV extra issue snagglewest 1 818 2021-09-21, 04:12 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode