[Plugin] YaRSS2 - RSS plugin with GTKUI support

Suggest, post, or discuss plugins for Deluge
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

I applaud your efforts! :)

Does this work?

YaRSS2-2.1.5-py3.9.egg

I diffed the modded version against the original 1.3.3 version, and added changes to newest 2.1.5 version, like yourself, but have only checked that it is seen and can be enabled without error, but not verified actual changed functionality. Anyway, was just a quick hack job, so no promises :) Rename to match python version, tested on linux latest dev deluge.
gortklatuu
New User
New User
Posts: 4
Joined: Sat Mar 27, 2021 12:15 pm

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by gortklatuu »

No, I get the following error report:

Code: Select all

Traceback (most recent call last):
  File "/home/xyz/.config/deluge/plugins/YaRSS2-2.1.5-py3.8.egg/yarss2/rssfeed_scheduler.py", line 90, in rssfeed_update_handler_safe
    return self.rssfeed_update_handler(rssfeed_key=rssfeed_key, subscription_key=subscription_key)
  File "/home/xyz/.config/deluge/plugins/YaRSS2-2.1.5-py3.8.egg/yarss2/rssfeed_scheduler.py", line 107, in rssfeed_update_handler
    fetch_result = self.rssfeedhandler.fetch_feed_torrents(self.yarss_config.get_config(), rssfeed_key,
  File "/home/xyz/.config/deluge/plugins/YaRSS2-2.1.5-py3.8.egg/yarss2/rssfeed_handling.py", line 375, in fetch_feed_torrents
    self.fetch_feed(subscription_data, rssfeed_data, fetch_data)
  File "/home/xyz/.config/deluge/plugins/YaRSS2-2.1.5-py3.8.egg/yarss2/rssfeed_handling.py", line 414, in fetch_feed
    rssfeed_parsed = self.get_rssfeed_parsed(rssfeed_data, site_cookies_dict=fetch_data["site_cookies_dict"],
  File "/home/xyz/.config/deluge/plugins/YaRSS2-2.1.5-py3.8.egg/yarss2/rssfeed_handling.py", line 236, in get_rssfeed_parsed
    if item.has_key('folder'):
AttributeError: 'dict' object has no attribute 'has_key'
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

I'm sorry, should have tested it more, and remembered wrong as thought you said you could see but not enable it because errors shown, don't know where got that from lol, and as I could enable without error, then hoped would work, but indeed I now see that when adding a new feed, then shows error when run from terminal or in debug log, damn, thought I was clever for a second, but nope, dumbass as usual lol :) Sorry again for wasting your time - I'm taking a look at it now, and if can fix then will post again, but doubt it honestly, as myself a noob unfortunetly.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

I fixed the displayed error gotten when adding feed, then got another when actually running the subscription and so fixed that, so now works without error for normal usecases, but I cannot test the actual requested usecase, since have no feeds including 'folder' attribute, so have no idea if works or not for that, sorry.

YaRSS2-2.1.5-py3.9.egg

Edit: Sorry, no-go unfortunately :( No errors shown, but isn't moved to the special 'folder' attribute definition either. Sometimes shows time-out error but is in unmodded part of code, so think unrelated, and comes through little after(Edit2: Ohh, i'd presume that was the fix gderf mentioned previously making himself I recall now, to extend the 10 sec timeout for sometimes problematic/slow feeds). I think just am not clever enough fixing up the code. Sorry for noise, hopefully others can assist better than my failed attempt. Pretty cool idea btw. I saw I could register account by just entering user/pass without needing email or anything, so did a few quick tests, without succes as said though.
gortklatuu
New User
New User
Posts: 4
Joined: Sat Mar 27, 2021 12:15 pm

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by gortklatuu »

Thanks for looking into this! I think your version is missing one line in rssfeed_handling.py. The last statement fetch_data["matching_torrents"].append() had an added value for the folder in the old modified version.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

Doh! Thanks mate, embarrsing that I missed that :)

I added and get error about nonetype object has no attribute replace, and thought I found the problem by that being deprecated in python3, but wasen't that, and works I can see when using replace() in python myself manually, so other issue now, and I changed the code to print out the folder part before the fail and it's 'None' so something is def wrong in my modding, as can clearly see the correct 'folder' attribute in the used feed when curl/grep'ing it. As said, I doubt I can fix, but will return if finding something out later, and thanks yourself for catching my stupid error about missing line, as I anyway was gonna look into it again, hate giving up on stuff, though often have too eventually, and will help me atleast not spinning my wheels in an exercise in futility - possibly wrong saying, but to lazy to look up now honeslty :)
zigggggy
New User
New User
Posts: 2
Joined: Mon Apr 05, 2021 6:41 pm

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by zigggggy »

Getting the error below with YaRSS2-2.1.4-py3.8.egg. I tried also some of the ones mhertz posted, but same issue with those.

Code: Select all

 
(2021-04-05T14:45:43): Exception occured in feedparser: <urlopen error unknown url type: https>
(2021-04-05T14:45:43): Feedparser was called with url: 'https://removed' using cookies: '{}' and User-agent: 'Deluge v2.0.4.dev51 YaRSS2 v2.1.4 Windows/10'
(2021-04-05T14:45:43): Stacktrace:
!! Traceback (most recent call last):
!!   File "c:\users\foo\appdata\roaming\deluge\plugins\yarss2-2.1.4-py3.8.egg\yarss2\rssfeed_handling.py", line 184, in get_rssfeed_parsed
    parsed_feed = fetch_and_parse_rssfeed(rssfeed_data["url"], user_agent=user_agent,
!!   File "c:\users\foo\appdata\roaming\deluge\plugins\yarss2-2.1.4-py3.8.egg\yarss2\rssfeed_handling.py", line 103, in fetch_and_parse_rssfeed_atom
    result = http.download_file(url_file_stream_or_string, site_cookies_dict=site_cookies_dict,
!!   File "c:\users\foo\appdata\roaming\deluge\plugins\yarss2-2.1.4-py3.8.egg\yarss2\util\http.py", line 48, in download_file
    data = feedparsing._open_resource(url_file_stream_or_string, etag, modified, user_agent, referrer,
!!   File "c:\users\foo\appdata\roaming\deluge\plugins\yarss2-2.1.4-py3.8.egg\yarss2\util\feedparsing\api.py", line 110, in _open_resource
    return http.get(url_file_stream_or_string, etag, modified, agent, referrer, handlers, request_headers, result, timeout=timeout)
!!   File "c:\users\foo\appdata\roaming\deluge\plugins\yarss2-2.1.4-py3.8.egg\yarss2\util\feedparsing\http.py", line 178, in get
    f = opener.open(request, timeout=timeout)
!!   File "urllib\request.py", line 525, in open
!!   File "urllib\request.py", line 547, in _open
!!   File "urllib\request.py", line 502, in _call_chain
!!   File "urllib\request.py", line 1425, in unknown_open
!! urllib.error.URLError: <urlopen error unknown url type: https>
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

I'm sorry zigggggy, i'm guessing from that reported error and user-agent that you're using my "win7" installer, and little after posting it, well maybe a couple days after not really sure, but anyway then found an issue which I fixed and reuploaded with following edit underneath:
Edit: Sorry just noticed yarss2 cannot do https feeds with these above deuge builds, as I had removed two files I thought was redundant, so readded them back and rebuilt, and tested working again.
Here's the updated link from that post if interessted:

deluge-2.0.4.dev51.exe

If not wanna reinstall, as just a matter of two missing files, then you can download and extract following zip into your install folder:

missing.zip

Sorry again for inconvinience. (I thought they where redundant because already provided these two ssl dlls in another folder for libtorrent's usage, but granted they had 'x64' in there name additionally, so not importable by python's ssl wrapper i'm guessing then.)

If not using my installer, then you're having an issue with the ssl module of python, e.g. as my issue above with two missing ssl dll's.
zigggggy
New User
New User
Posts: 2
Joined: Mon Apr 05, 2021 6:41 pm

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by zigggggy »

Thank you very very much mhertz! :mrgreen:

P.S. I am actually on win10, but I didn't see any dev51 builds for w10. The dev50 is not working for me, but your win7 dev51 worked no problem and seems like the only diff is it uses python v3.8.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] YaRSS2 - RSS plugin with GTKUI support

Post by mhertz »

zigggggy wrote:Thank you very very much mhertz!
You're most welcome mate :)
P.S. I am actually on win10, but I didn't see any dev51 builds for w10.
Yeah, I didnt want to step on petersasi's feet, if that saying even makes sence in the US :)
The dev50 is not working for me, but your win7 dev51 worked no problem and seems like the only diff is it uses python v3.8.
Indeed, as you say only diff is little older python, and small other stuff compared to petersasi's version. Btw, if remember right then petersasi's latest version doesnt start in portable mode and the two older libtorrent's isnt working, in addition to the missing icons, and if you or others are interested, then I have zip's available to fix these issues laying around, that I previously made in case anybody requested me about it, so just say the word, well im gonna edit this post with them when I get home later today just in case, and sorry @bro for my off-topic post.

Edit: @zigggggy, I just realized I had some time ago uploaded a dev51 "win10", just for full reference since you said you specifically had looked for it: https://paste.c-net.org/HavenChock. It was an earlier version initially, which I later found an issue with and then made "silent" update as wouldn't want something I uploaded to have issues, and I then used newest code in it instead of old while having to rebuild to fix anyways, as else would need target specific older commit for it, which would be silly - but anyway here's fixes for petersasi's latest version provided, and the first 4 are the fixes in zip, and the next 4 are the same fixes, but just is packed in "patch" exe's which can be run and select your install folder or accept default suggested location and press OK to apply fix and done - 2'nd exe fix isn't raising admin-prompt(UAC) as portable mode ussually isn't using restricted location as install location(but can be rightclicked and run as admin), and rest will raise UAC prompt for admin-rights as e.g. usually is installed into restricted %programfiles%\Deluge, which also is default suggested location except portable-fix which is 'current-folder\Deluge' - People can verify if wanted what is included in the exe's with 7-zip and 7z-splitter, where the later can retrieve the 7-zipped payload and the embedded config file that is run upon execution, just for full reference, as running exe's from strangers online obviously isn't recommended, so zips is the recommended approach, but nonetheless(very quick for me to make the exe's as scripted most of the process and avoids errors like extracting in new folder instead of direct etc):

Adwaita.zip (icons fix): https://paste.c-net.org/DeputiesYadda (replace 'data\share\icons\Adwaita')

path.pth (portable fix): https://paste.c-net.org/BurglarsUneasy (replace 'Lib\site-packages\path.pth')

libtorrent.pyd (libtorrent 1.2.3 fix): https://paste.c-net.org/BagpipesTonya (replace 'Lib\site-packages\libtorrent.pyd')

libtorrent.pyd (libtorrent 1.1.x fix): https://paste.c-net.org/BudgeReign (replace 'Lib\site-packages\libtorrent.pyd')

deluge-icons_fix.exe: https://paste.c-net.org/HubbaComedy

deluge-portable_fix.exe: https://paste.c-net.org/LobstersVilandra

deluge-lt1.2.3_fix.exe: https://paste.c-net.org/MottoAverted

deluge-lt1.1.x_fix.exe: https://paste.c-net.org/MentionJolly
Last edited by mhertz on Tue May 18, 2021 4:12 pm, edited 1 time in total.
Post Reply