FlexRSS plugin

Suggest, post, or discuss plugins for Deluge
Locked
klrspz
New User
New User
Posts: 5
Joined: Fri Sep 14, 2007 6:04 pm

Re: FlexRSS plugin

Post by klrspz »

1) Sounds cool. I would have to store a list of every torrent ever downloaded by flexrss in addition to the history information already there... I'll think about it :)
2) They are in the same order as they appear in the feed--for every feed I've encountered, that means the newest entry is on top... that way you don't have to read the entire list to know what is new. Does that clear things up enough, or do you still want this feature (it seems a bit silly to me, but if that's what people want...)?
I come from the uTorrent world, so if possible I suggest you check out the RSS feature of it.

1) Again, referring to uTorrent's RSS capabilities, it has a tab dedicated to the history of downloaded torrents (simply the name without the .torrent extension, and the date it was downloaded [it's not sortable in their tab, but it'd be nice if it was in yours :)]) The user also has the ability to remove individual records from the history. I use this to know what the last episode of a show was downloaded, and often clean up the previous ones after the list gets long... That would take care of the concern of storing tons of superfluous data - I feel the end user should/could be capable of cleaning up after themselves. After all, it's not really that much data, maybe 20-30 bytes per torrent name?

2) I understand your reasoning behind this, and do actually like that feature. However there are a few feeds that have long expire times in what content they serve, and iI might miss a few pieces of content (whether it be shows, updates to applications, etc) and I need to backtrack. It would be nice if it were, say, a radio button or drop down at the bottom of the feed window with 2 options of a) Order by Date, b) Order Alphabetically. Instead of doing a hunt-n-peck search by eye (which I often miss since my HTPC is hooked up to a crappy TV and is fuzzy) it would be nice to have them sorted alphabetically to help expedite the human component of the searching.

Which brings me to a new #3
3) is it feasible to have a quick-search (like firefox or gtk panels generally have) that will search through the names on the feed? I personally don't find a lot of use in this, but would probably use it if it were available.

Lastly, I consider myself a strong PHP/C# developer, and currently do this for a living. I too am looking to venture into the Python world (mostly because of your plugin, as well as some BF2 mods i wanna do, as well as compiz plugins), and am currently looking at tutorials provided by Python.org. Any suggestions on documentation to read up on? Also, I would LOVE to contribute once I get enough knowledge of the namespaces (is that the right terminology in Python?) and syntax structure.

Thanks again,

KlrSpz
psyberOne
Member
Member
Posts: 12
Joined: Tue Sep 04, 2007 5:48 am

Re: FlexRSS plugin

Post by psyberOne »

Here's a list of great sites I found when I started in Python (I did mostly minor graphical stuff)
Official Python Site
Basic tutorial for python structures and syntax
Specifics for PyGTK2

that shoud give you a good base on the internet and as you probably know google is your best friend.
lega
New User
New User
Posts: 3
Joined: Sat Sep 22, 2007 12:48 pm

Re: FlexRSS plugin

Post by lega »

Hello, I am experiencing problems to form this plugin use feed rss of Argenteam

Feed HDTV= http://www.argenteam.net/rss/tvseries_torrents.xml for this feed is used filters ej. for Prision Break the filter is PrisonBreak, I have tried to form plugin but nonprofit that works.

Perhaps these are images to form Azureus serves.
Image
Image

thanks to help me, excuses by my badly English
daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: FlexRSS plugin

Post by daddy »

klrspz wrote:1) Again, referring to uTorrent's RSS capabilities, it has a tab dedicated to the history of downloaded torrents (simply the name without the .torrent extension, and the date it was downloaded [it's not sortable in their tab, but it'd be nice if it was in yours :)]) The user also has the ability to remove individual records from the history. I use this to know what the last episode of a show was downloaded, and often clean up the previous ones after the list gets long... That would take care of the concern of storing tons of superfluous data - I feel the end user should/could be capable of cleaning up after themselves. After all, it's not really that much data, maybe 20-30 bytes per torrent name?
I've decided not to do this. It's not so much the extra few bytes of storage, more that it's a bit more work than I'm interested in putting into the plugin. I can see the use case, but I just don't feel it would be common enough to justify all the work, given the fact that (a) I'm really busy these days, and (b) I really hate python.
klrspz wrote:2) I understand your reasoning behind this, and do actually like that feature. However there are a few feeds that have long expire times in what content they serve, and iI might miss a few pieces of content (whether it be shows, updates to applications, etc) and I need to backtrack. It would be nice if it were, say, a radio button or drop down at the bottom of the feed window with 2 options of a) Order by Date, b) Order Alphabetically. Instead of doing a hunt-n-peck search by eye (which I often miss since my HTPC is hooked up to a crappy TV and is fuzzy) it would be nice to have them sorted alphabetically to help expedite the human component of the searching.
Instead of implementing another widget, it would probably be easier to add a date column, then make the columns sortable by clicking on the header. It wouldn't be overly difficult, so I'll put it on my todo list, but it will have a very low priority (might get done in a few weeks).
klrspz wrote:Which brings me to a new #3
3) is it feasible to have a quick-search (like firefox or gtk panels generally have) that will search through the names on the feed? I personally don't find a lot of use in this, but would probably use it if it were available.
Good idea. Implemented, and I'll upload a new version when I'm finished typing this post :)
klrspz wrote:Lastly, I consider myself a strong PHP/C# developer, and currently do this for a living. I too am looking to venture into the Python world (mostly because of your plugin, as well as some BF2 mods i wanna do, as well as compiz plugins), and am currently looking at tutorials provided by Python.org. Any suggestions on documentation to read up on? Also, I would LOVE to contribute once I get enough knowledge of the namespaces (is that the right terminology in Python?) and syntax structure.
I pretty much just dove in. I decided I wanted this plugin, so I skimmed over the tutorial on python.org, then started writing it. As far as learning the namespace structure, I just googled whatever I needed and appended "python" to the query. That's why the code for this plugin is such crap, but I honestly didn't think there would be much of any interest in this plugin (I thought people would overwhelmingly prefer the simple rss plugin) so I didn't worry too much about it.

If you're still interested in helping out with the plugin after you see the code, feel free to post patches. To be honest, I wouldn't mind passing control of this project to someone else eventually.


lega wrote:Hello, I am experiencing problems to form this plugin use feed rss of Argenteam

Feed HDTV= http://www.argenteam.net/rss/tvseries_torrents.xml for this feed is used filters ej. for Prision Break the filter is PrisonBreak, I have tried to form plugin but nonprofit that works.
Create a filter and set the type to "TV Show". The pattern should be "prisonbreak\.s%se%e". To have the plugin do it for you, right click on the PrisonBreak item on the feeds tab, then choose "Create filter".
User avatar
bidossessi
Member
Member
Posts: 33
Joined: Mon Jul 23, 2007 10:12 am
Location: Algiers, Algeria
Contact:

Re: FlexRSS plugin

Post by bidossessi »

Code: Select all

*** FlexRSS error: unable to add torrent.
Warning: torrent content-type not application/x-bittorrent
Raising error: 
Error: ''
------------
after al lot of those, deluge finally crashes.
has this been already mentionned/fixed?

running last week's svn deluge and last week's flexrss
here is my flexrss.dat file, in case it helps:
http://pastebin.com/m6898d24d
it's rather unfortunate because i think this might actually work for me, well, better than azureus, certainly
OpenSuse 10.3 /kernel 2.6.22.13-default /AMD64/512Mib RAM/Nvidia FX5500/Deluge from OpenSuse RPM repository ( 2.5.8)
Ubuntu Gutsy /kernel 2.6.22.14-generic /P4/1Gib RAM/Nvidia FX5200/Deluge from Deluge web package ( 2.5.8 )
daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: FlexRSS plugin

Post by daddy »

bidossessi,

The problem is the feed. Take a look at http://btjunkie.org/rss.xml?query=dvdrip+axxo+eng (your feed). The link elements have to contain direct links to the torrent for FlexRSS to work, but that feed has links to the (HTML) detailed description.

I don't know why it crashes eventually (if you want to post that error message I'll take a look).
User avatar
bidossessi
Member
Member
Posts: 33
Joined: Mon Jul 23, 2007 10:12 am
Location: Algiers, Algeria
Contact:

Re: FlexRSS plugin

Post by bidossessi »

i finally removed the offensive links and dappered me what i wanted.
thanks for the way out.
a beautiful plugin, gets the job done better'n most!
thx
OpenSuse 10.3 /kernel 2.6.22.13-default /AMD64/512Mib RAM/Nvidia FX5500/Deluge from OpenSuse RPM repository ( 2.5.8)
Ubuntu Gutsy /kernel 2.6.22.14-generic /P4/1Gib RAM/Nvidia FX5200/Deluge from Deluge web package ( 2.5.8 )
daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: FlexRSS plugin

Post by daddy »

I just uploaded a new version. It uses the feed URL as the HTTP referer, which strikes me as the polite thing to do. It also adds "Link Rewriting", which allows you to rewrite the URL provided in a feed according to a regular expression (*cough* bidossessi *cough*). If you can figure out the basics of python regex search and replace you can use backreferences, named groups, etc.

Since I haven't heard of any bugs in a while, I went ahead and bumped the version to 0.2.0. I doubt I'll bump the minor version again without a significant refactoring of both the UI and internal structure, which I doubt I'll ever do.

Enjoy :)
pyjamasam

Re: FlexRSS plugin

Post by pyjamasam »

After getting tired of uTorrent under wine I have started using Deluge, and since most of what I download comes from RSS feeds I installed your plugin right away.

After setting up some feeds I noticed that one wasn't being parsed correctly.

The culpret: http://lwltorrents.lwltracker.info/bt/rss.php

Turns out that it doesn't have any link elements in the feed entries. Just enclosures.

I modified plugin.py to deal with missing link elements and try enclosures. It works for me now so I though I would contribute the changes back. Hopefully this can help others.

I really like your plugin and it works very nicley (I enjoy the power of the full regexs).

Code: Select all

--- /home/chris/FlexRSS/plugin.py       2007-10-07 04:26:10.000000000 -0400
+++ /usr/share/deluge/plugins/FlexRSS/plugin.py 2007-10-19 10:40:06.000000000 -0400
@@ -1567,11 +1567,17 @@
                data = []

                for entry in parsed.entries:
+                       entryTitle = entry['title']
+
                        try:
-                               data.append({ 'title' : entry['title'],
-                                                         'link'  : entry.links[0]['href'] })
+                               entryLink = entry.links[0]['href']
                        except:
-                               continue
+                               try:
+                                       entryLink = entry.enclosures[0]['href']
+                               except:
+                                       continue
+
+                       data.append({ 'title' : entryTitle,'link'  : entryLink })

                        if self.config.filters:
                                for filter in self.config.filters:
@@ -1592,9 +1598,9 @@
                                                # Edit (~a month later): I still dislike it a lot, though.
                                                try:
                                                        if pattern[1] == 'Title':
-                                                               subject = entry['title']
+                                                               subject = entryTitle
                                                        else:
-                                                               subject = entry['links'][0]['href']
+                                                               subject = entryLink
                                                except:
                                                        print 'Unable to find subject.'

@@ -1603,9 +1609,9 @@
                                                        # Filter matched. Check history to see if
                                                        # we should download it.
                                                        if filter['type'] == self.config.constants['Generic']: # Dirty hack.
-                                                               match = { 'url' : entry.links[0]['href'] }
+                                                               match = { 'url' : entryLink }

-                                                       torrent_url = entry.links[0]['href']
+                                                       torrent_url = entryLink
                                                        replace = filter.get('replace', {'pattern': '', 'with': ''})
                                                        if len(replace['pattern']) > 0:
                                                                try:

daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: FlexRSS plugin

Post by daddy »

pyjamasam wrote:I modified plugin.py to deal with missing link elements and try enclosures. It works for me now so I though I would contribute the changes back. Hopefully this can help others.
I uploaded your changes as 0.2.1. Thanks for the patch!
Locked