This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to subscribe to https-feeds in Akregator via Firefox?

Tags: None
(comma "," separated)
markum
Registered Member
Posts
165
Karma
1
Hi,

I am using a script I found years ago on the internet to subscribe to rss-feeds via Firefox in Akregator:

Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]
then
#   echo "starting... " >> /tmp/akregator-rss-subscribe.log
   akregator
fi

for f in "${@/feed/http}"; do
#   echo "$f" >> /tmp/akregator-rss-subscribe.log
#       dcop akregator AkregatorIface addFeedsToGroup "[" "$f" "]" "Firefox Subscribe"
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$f" "Imported Feeds"
done

It works fine, but I noticed that it causes some problems if the page is encrypted with "https".
If I add the feed of "https://wiki.mozilla.org/index.php?title=Special:RecentChanges"
it appears as "http: https://wiki.mozilla.org/index.php?titl ... &feed=atom" in Akregator. Since It works fine, when I do this in Konqueror, I assume the problem is with the script. Does anyone have an idea how to fix this?

Markum


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Are you aware of what the argument being passed to the script is trying to do? It looks like it is trying to turn a feed:// url into a http:// url, which fails with https.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
markum
Registered Member
Posts
165
Karma
1
bcooksley wrote:Are you aware of what the argument being passed to the script is trying to do? It looks like it is trying to turn a feed:// url into a http:// url, which fails with https.

I do not exactly understand your question. I have not written the script myself and I do not really understand what it is doing exactly because I lack the knowledge.


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The issue is both with the script and Firefox. Firefox behaves differently depending on if the URL is http or https.
Try the following script instead, and see if that works for both http and https urls.
Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]; then
   akregator
fi

for url in "$@"; do
   actualUrl=${f/feed/http}
   actualUrl=${actualUrl/http:https/https}
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$actualUrl" "Imported Feeds"
done


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
markum
Registered Member
Posts
165
Karma
1
bcooksley wrote:The issue is both with the script and Firefox. Firefox behaves differently depending on if the URL is http or https.
Try the following script instead, and see if that works for both http and https urls.


Thanks. The behaviour has changed, but it is still not working correctly. Instead of

Code: Select all
https://wiki.mozilla.org/index.php?title=Special:RecentChanges&feed=atom


it adds:
Code: Select all
https://wiki.mozilla.org/index.php%3Ftitle=Special:RecentChanges&feed=atom?title=Special:RecentChanges

which does not work.

Last edited by markum on Sat Jul 20, 2013 7:39 am, edited 1 time in total.


markum, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I could not reproduce that issue specifically, but I did identify another bug.
Try this instead:
Code: Select all
#!/bin/bash
if [-z`/bin/pidof akregator`]; then
   akregator
fi

for url in "$@"; do
   actualUrl=${url/feed/http}
   actualUrl=${actualUrl/http:https/https}
   qdbus org.kde.akregator /Akregator org.kde.akregator.part.addFeedsToGroup "$actualUrl" "Imported Feeds"
done


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
markum
Registered Member
Posts
165
Karma
1
Now it works. Great! Thanks!


markum, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]