1
我正在編寫一個管道來重新映射RSS源中的幾個節點。雅虎管道 - 防止節點轉義文本
最近創建了一個新的torrent名稱空間,並在一些提供bittorrent提要的站點上使用。 Feed中每個項目的torrent節點都包含magnet/URI,我試圖將其重新映射到媒體內容的鏈接,所以我的BitTorrent客戶端將默認下載該文件,而不是文件本身,因爲我幾乎可以保證它可以獲得由於正常運行時間問題,不像直接下載torrent文件,通過DHT提供的torrent文件。
我已經設法重新映射它,除了磁條uri被儲存爲012UR在magnetURI節點。當管道處理它時,它正在逃避uri特定的字符,如&符號。有沒有辦法強制管道呈現的數據,而不逃避它?
下面是從飼料的一個拉一個項目的例子:一旦它貫穿這裏的一切都重新映射你可以看到media:content
URI已經躲過了磁鐵的管道
<item>
<title><![CDATA[Some torrent title]]></title>
<link>http://www.somebittorrentsite.com/fileofinterest.torrent</link>
<pubDate>Mon, 21 Feb 2011 00:00:00 -0000</pubDate>
<description><![CDATA[A torrent file you'd like to download.]]></description>
<enclosure url="http://www.somebittorrentsite.com/fileofinterest.torrent" length="123456789" type="application/x-bittorrent" />
<guid>912554a5-dd0e-4bee-b2ed-d776e0471552</guid>
<torrent xmlns="http://xmlns.ezrss.it/0.1/">
<fileName><![CDATA[fileofinterest.torrent]]></fileName>
<contentLength>123456789</contentLength>
<infoHash>E4799FF799F9C8C26BA087C601A732DF748FDFB0</infoHash>
<magnetURI><![CDATA[magnet:?xt=urn:btih:E4799FF799F9C8C26BA087C601A732DF748FDFB0&dn=fileofinterest]]></magnetURI>
</torrent>
</item>
。
<item>
<title>Some torrent title</title>
<link>http://www.somebittorrentsite.com/fileofinterest.torrent</link>
<description>A torrent file you'd like to download.</description>
<guid isPermaLink="false">912554a5-dd0e-4bee-b2ed-d776e0471552</guid>
<pubDate>Mon, 28 Feb 2011 19:44:07 -0800</pubDate>
<media:content url="magnet:?xt=urn:btih:E4799FF799F9C8C26BA087C601A732DF748FDFB0&amp;dn=fileofinterest" type="application/x-magnet"/>
</item>