我想从以下RSS Feed中下载每集的视频
http://feeds.cbsnews.com/CBSNewsVideo
从这个xml,我可以得到每集的标题,描述和链接。我不知道如何从该链接中检索视频。我想在我的Sdcard中下载这些视频。
我的问题是:
如何从剧集的链接中获取视频?
修改
我从以上this xml html之一找到了link(播放列表)。
我在下面给出了播放列表Xml:
<playlist revision="1">
<id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22793516</id>
<title>Where Guantanamo's hunger strike began </title>
<summary>The BBC's Jonathan Beale takes a tour of Guantanamo Bay, where more than 100 detainees are now on hunger strike. </summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/world-us-canada-22793516"/>
<link rel="holding" href="http://news.bbcimg.co.uk/media/images/68007000/jpg/_68007602_68007601.jpg" width="640" height="360" type="image/jpeg"/>
<published>2013-06-06T04:04:39Z</published>
<updated>2013-06-06T05:49:47Z</updated>
<config>
<settings> <setting name="language">en</setting> </settings>
<plugin name="fmtjLiveStats">
<param name="siteId">News</param>
<param name="uniqueId">22793516</param>
<param name="parentSection">99127</param>
</plugin>
</config>
<rights><!-- Blocked for 3rd party embedding. --><right name="embed">blocked</right></rights>
<item kind="advert">
<id>tag:bbc.co.uk,2008:cps:advert:mediaAsset:22793516</id>
<media kind="video" width="640" height="360" type="video/mp4">
<connection kind="doubleClick" companionSize="$companionSize" companionType="$companionType" companionId="$companionId" href="$preroll"/>
</media>
</item>
<item kind="ident">
<id>tag:bbc.co.uk,2008:cps:ident:news:video:640x360</id>
<media kind="video" width="640" height="360" type="video/mp4">
<connection kind="akamai" identifier="public/flash/ident/news" server="cp45414.edgefcs.net"/>
</media>
</item>
<item kind="programme" duration="130" identifier="22793516" group="p01b18l6"><id>tag:bbc.co.uk,2008:cps:mediaAsset:22793516</id><mediator identifier="p01b18l6" name="pips"/>
</item>
<!-- related links --><relatedLink><id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22349190</id>
<title>Guantanamo Bay detentions explained</title>
<summary>American authorities have sent extra medical staff to the Guantanamo detention camp to help deal with a growing hunger strike by its inmates.</summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/world-us-canada-22349190"/>
<link rel="thumb" href="http://news.bbcimg.co.uk/media/images/67316000/jpg/_67316425_09fe0d5b-c5b3-4a17-b884-34f6591b24e8.jpg" width="112" height="63" type="image/jpeg"/>
</relatedLink>
<relatedLink>
<id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22649505</id>
<title>Obama heckled over Guantanamo Bay</title>
<summary>US President Barack Obama is heckled over his failure to close the Guantanamo Bay prison by a member of the audience during a national security speech.</summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/world-us-canada-22649505"/>
<link rel="thumb" href="http://news.bbcimg.co.uk/media/images/67787000/jpg/_67787465_67786949.jpg" width="112" height="63" type="image/jpeg"/>
</relatedLink>
<relatedLink>
<id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22361550</id>
<title>Obama renews vow to close Guantanamo</title>
<summary>US President Barack Obama pledges a new push to close the prison at Guantanamo Bay, Cuba, amid a growing prisoner hunger strike there.</summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/world-us-canada-22361550"/>
<link rel="thumb" href="http://news.bbcimg.co.uk/media/images/67338000/jpg/_67338544_67338442.jpg" width="112" height="63" type="image/jpeg"/>
</relatedLink>
<relatedLink><id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22249470</id>
<title>Guantanamo Bay hunger strike spreads</title>
<summary>A US military spokesman says that 84 of the 166 prisoners at Guantanamo Bay are now on hunger strike, but none have life-threatening conditions.</summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/world-us-canada-22249470"/>
<link rel="thumb" href="http://news.bbcimg.co.uk/media/images/67165000/jpg/_67165552_aptn_guantanamo.jpg" width="112" height="63" type="image/jpeg"/>
</relatedLink>
<relatedLink>
<id>tag:bbc.co.uk,2008:cps:playlist:mediaAsset:20730083</id>
<title>Guantanamo inmate sues government</title>
<summary>A man detained at Guantanamo Bay whose family live in south-west London has started a defamation suit against the UK security and intelligence services.</summary>
<link rel="alternate" href="http://www.bbc.co.uk/news/uk-england-london-20730083"/>
<link rel="thumb" href="http://news.bbcimg.co.uk/media/images/64779000/jpg/_64779275_64774165.jpg" width="112" height="63" type="image/jpeg"/>
</relatedLink>
</playlist>
有没有办法在Android中使用此播放列表ID(tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22793516
)下载视频?
我引用此link来使用此播放列表ID更改下载视频。
请帮帮我!或者给出任何想法来实现它!!
提前致谢!
答案 0 :(得分:0)
这不是那么简单。我研究了CBS RSS链接,它的设计不允许直接下载视频。它旨在提供用户可以关注并登陆网站的链接,他们可以在网站上查看视频。从理论上讲,自动下载视频仍然是可能的,但根本不是那么简单。程序必须解析链接,下载HTML,解析HTML并从页面中基于Flash的视频播放器周围的嵌入值中提取有关视频文件的信息。然后,假设可以通过原始HTTP下载数据,找出直接视频URL并下载视频。
一切皆有可能;只取决于你需要付出多少努力。