首頁 收藏 QQ群
 網(wǎng)站導航

ZNDS智能電視網(wǎng) 推薦當貝市場

TV應用下載 / 資源分享區(qū)

軟件下載 | 游戲 | 討論 | 電視計算器

綜合交流 / 評測 / 活動區(qū)

交流區(qū) | 測硬件 | 網(wǎng)站活動 | Z幣中心

新手入門 / 進階 / 社區(qū)互助

新手 | 你問我答 | 免費刷機救磚 | ROM固件

查看: 40160|回復: 6
上一主題 下一主題
[入門學習]

教你如何提取XML文件的節(jié)目源地址

[復制鏈接]
跳轉到指定樓層
樓主
發(fā)表于 2013-8-28 15:44 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式 | 來自浙江
應該有很多機友在找節(jié)目源的時候,會一不小心下載到XML格式的節(jié)目源文件,經(jīng)常會束手無策,不知道怎么提取里面的節(jié)目源地址。
本人也是小白用戶,在這里分享一個比較笨的做法。以下面這一串字符為例:
<?xml version="1.0" encoding="UTF-8"?>
<xml ><tvlist label="大雜燴[國內]" ><tv ><channelid >D0001</channelid>
<name >CCTV-1</name>
<url tvsource="P2P" ><![CDATA[http://vdn.apps.cntv.cn/api/getLiveUrlCommonRedirectApi.do?channel=pa://cctv_p2p_hdcctv1&type=ipad]]></url>
<url tvsource="LS1" ><![CDATA[http://live.gslb.letv.com/gslb?stream_id=cctv1&tag=live&ext=m3u8&sign=live_ipad]]></url>
<url tvsource="LS2" ><![CDATA[http://live.gslb.letv.com/gslb?stream_id=cctv1&tag=live&ext=m3u8]]></url>
<url tvsource="52" ><![CDATA[http://ipadlive.cntv.soooner.com/cctv_p2p_hdcctv1.m3u8]]></url>
<url tvsource="源3" ><![CDATA[http://119.4.250.55:1935/SRT_Live/CCTV1_M.stream/playlist.m3u8]]></url>
<url tvsource="BST" ><![CDATA[http://121.58.54.150/PLTV/88888888/224/0/3221225734/iptv18195.smil]]></url>
<url tvsource="高清1" ><![CDATA[rtsp://116.199.127.68/cctv1_HD]]></url>
<url tvsource="M3" ><![CDATA[http://74.82.62.53:1935/liverepeater/15.stream/playlist.m3u8]]></url>
<url tvsource="FY" ><![CDATA[http://hlslive1.cntv.wscdns.com/cache/1_/seg0/index=m3u8]]></url>
</tv>
<tv ><channelid >D0002</channelid>
<name >CCTV-2</name>
<url tvsource="LS1" ><![CDATA[http://live.gslb.letv.com/gslb?s ... &sign=live_ipad]]></url>
<url tvsource="P2P" ><![CDATA[http://vdn.apps.cntv.cn/api/getL ... cctv2&type=ipad]]></url>
<url tvsource="源3" ><![CDATA[http://119.4.250.55:1935/SRT_Live/CCTV2_M.stream/playlist.m3u8]]></url>
<url tvsource="BST" ><![CDATA[http://121.58.54.150/PLTV/888888 ... 5733/iptv18196.smil]]></url>
<url tvsource="52" ><![CDATA[http://ipadlive.cntv.soooner.com/cctv_p2p_hdcctv2.m3u8]]></url>
<url tvsource="源8/8" ><![CDATA[http://74.82.62.53:1935/liverepeater/14.stream/playlist.m3u8]]></url>
<url tvsource="FY" ><![CDATA[http://hlslive1.cntv.wscdns.com/cache/7_/seg0/index=m3u8]]></url>
</tv>

1、在“<name >”和“</name>”之間的字符為頻道名稱,像上面標紅的CCTV-1就是頻道名稱
2、頻道名稱下面的用“[]”框起來以“http”或者這“rtsp”開頭,在上面以紫色標記部分為節(jié)目源地址
3、將節(jié)目源頻道和節(jié)目源地址提取出來,有多個節(jié)目源的以同樣的名稱命名即可實現(xiàn)多源切換如:
CCTV-1   http://vdn.apps.cntv.cn/api/getLiveUrlCommonRedirectApi.do?channel=pa://cctv_p2p_hdcctv1&type=ipad
CCTV-1   http://live.gslb.letv.com/gslb?stream_id=cctv1&tag=live&ext=m3u8&sign=live_ipad
CCTV-1   http://live.gslb.letv.com/gslb?stream_id=cctv1&tag=live&ext=m3u8
CCTV-1   http://ipadlive.cntv.soooner.com/cctv_p2p_hdcctv1.m3u8
CCTV-1   http://119.4.250.55:1935/SRT_Live/CCTV1_M.stream/playlist.m3u8
CCTV-1   http://121.58.54.150/PLTV/88888888/224/0/3221225734/iptv18195.smil
CCTV-1   rtsp://116.199.127.68/cctv1_HD
CCTV-1   http://74.82.62.53:1935/liverepeater/15.stream/playlist.m3u8
CCTV-1   http://hlslive1.cntv.wscdns.com/cache/1_/seg0/index=m3u8

上一篇:教你如何把.txt文件t改成泰捷視頻自動識別的.tv文件
下一篇:【新手教程】教你如何在小米盒子中安裝應用
沙發(fā)
發(fā)表于 2013-10-7 12:46 | 只看該作者 | 來自香港
thanks
回復 支持 反對

使用道具 舉報

板凳
發(fā)表于 2013-10-12 22:23 | 只看該作者 | 來自浙江
有用
回復 支持 反對

使用道具 舉報

地板
發(fā)表于 2013-10-13 12:56 | 只看該作者 | 來自山東
ddddddddddddd
回復 支持 反對

使用道具 舉報

5#
發(fā)表于 2013-10-13 20:45 | 只看該作者 | 來自山東
謝謝老師
回復 支持 反對

使用道具 舉報

6#
發(fā)表于 2013-12-10 15:51 | 只看該作者 | 來自山西
學習了
回復 支持 反對

使用道具 舉報

7#
發(fā)表于 2014-6-25 10:30 | 只看該作者 | 來自安徽
強烈支持樓主ing……
回復 支持 反對

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

Archiver|新帖|標簽|軟件|Sitemap|ZNDS智能電視網(wǎng) ( 蘇ICP備2023012627號 )

網(wǎng)絡信息服務信用承諾書 | 增值電信業(yè)務經(jīng)營許可證:蘇B2-20221768 丨 蘇公網(wǎng)安備 32011402011373號

GMT+8, 2024-9-20 11:56 , Processed in 0.071167 second(s), 15 queries , Redis On.

Powered by Discuz!

監(jiān)督舉報:report#znds.com (請將#替換為@)

© 2007-2024 ZNDS.Com

快速回復 返回頂部 返回列表