From 60765741504c2373524d95fa186c3cf7b91fbe80 Mon Sep 17 00:00:00 2001 From: raspbeguy Date: Tue, 24 May 2016 17:45:38 +0200 Subject: [PATCH] fixed torrent ext, but still not doing what we want --- .gitignore | 2 ++ feedgen/ext/torrent.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6f6775..02bef52 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ feedgen/tests/tmp_Rssfeed.xml tmp_Atomfeed.xml tmp_Rssfeed.xml + +build/** diff --git a/feedgen/ext/torrent.py b/feedgen/ext/torrent.py index 8d8d9ca..09e54cb 100644 --- a/feedgen/ext/torrent.py +++ b/feedgen/ext/torrent.py @@ -44,7 +44,7 @@ class TorrentEntryExtension(BaseEntryExtension): ''' enclosure = etree.SubElement(entry, '{%s}enclosure' % TORRENT_NS) guid = etree.SubElement(entry, '{%s}guid' % TORRENT_NS) - torrent = etree.SubElement(entry, '{%s]torrent' % TORRENT_NS) + torrent = etree.SubElement(entry, '{%s}torrent' % TORRENT_NS) enclosure.attrib['type'] = 'application/x-bittorrent' @@ -66,7 +66,7 @@ class TorrentEntryExtension(BaseEntryExtension): if self.__torrent_hash: torrent_hash = etree.SubElement(torrent, '{%s}infohash' % TORRENT_NS) torrent_hash.text = self.__torrent_hash - torrent.magnet = etree.SubElement(torrent, '{%s}magneturi' % TORRENT_NS) + torrent_magnet = etree.SubElement(torrent, '{%s}magneturi' % TORRENT_NS) torrent_magnet.text = 'magnet:?xt=urn:btih:' + self.__torrent_hash