How to spoof VLC's user agent
#1
Hey guys,

Just wondering if anyone would know how to spoof VLC's user agent in XBMC? I'm trying to open up a HTTP stream that requires XBMC to be read as a VLC client. (WinTV Extend recently added VLC client support and to get a untranscoded raw stream with AC-3 intact from the Hauppauge Colossus it requires that the user agent is VLC.)
Reply
#2
BTW, what is XBMC's user agent in case I want to tackle it from the other end?
Reply
#3
XBMC v10.1 sends:

Code:
User-Agent: XBMC/10.1 Git:e9e9099 (Windows; Windows Server 2008 R2, 64-bit (WoW) Service Pack 1 build 7601; http://www.xbmc.org)

VLC v1.1.11 sends:

Code:
User-Agent: NSPlayer/7.10.0.3059

JR
Reply
#4
XBMC supports the user agent faking by appending "|User-Agent=<agent-string>" to the URL. It's used in some addons and scrapers e.g. In case you want to utilize it from an addon urllib2 supports this as well (afaik).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Thank you. Fortunately no spoofing is needed. Just a simple .m3u is needed like

Code:
#EXTM3U
#EXTINF:-1,329 NBC Seattle (KINGH)
http://192.168.1.200:7799/stream?channel=329

Unfortunately if you add more then one channel to a playlist XBMC scans through all channels before allowing one to be selected (which can take a long time with a long channel list). The downside to one channel per m3u is that it requires you to select the playlist and then again the channel in the playlist. Is there a way around this?
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
How to spoof VLC's user agent00