0

我想从以下 RSS 源下载每一集的视频

http://feeds.cbsnews.com/CBSNewsVideo

从这个xml,我可以得到每集的标题、描述和链接。我不知道如何从该链接中检索视频。我想将这些视频下载到我的 SD 卡中。

我的问题是:

如何从该剧集的链接中获取视频?

编辑

我从上面链接的一个html中找到了这个 xml(播放列表)。

我在下面给出了播放列表 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>

有没有办法tag:bbc.co.uk,2008:cps:playlist:mediaAsset:22793516在 android 中使用这个播放列表 id() 下载视频?

我参考此链接以使用此播放列表 ID 更改下载视频。

请帮我!或者给出任何想法来实现它!

提前致谢!

4

1 回答 1

0

没那么简单。我研究过 CBS RSS 链接,它的设计目的不是允许直接下载视频。它旨在提供一个链接,用户可以关注该链接并登陆该网站,他们可以在该网站上查看网页上的视频。理论上仍然可以自动下载视频,但一点也不简单。程序必须解析链接、下载 HTML、解析 HTML 并从页面中基于 Flash 的视频播放器周围的嵌入值中提取有关视频文件的情报。然后,假设可以通过原始 HTTP 下载数据,找出直接视频 URL 并下载视频。

世事皆可能; 只是取决于你愿意付出多少努力。

于 2013-06-07T14:41:15.177 回答