[CDB] Feed post bot

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
JackEnox
Registered User
Posts: 26
Joined: Fri Jan 27, 2017 1:55 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by JackEnox »

Ger wrote: Thu Mar 09, 2017 2:05 pm Can you post a (readable) screenshot of your settings?
Image

Feeds:
http://fetchrss.com/rss/58b96bf88a93f8a ... 063075.xml
http://rest.ebay.com/epn/v1/find/item.r ... edType=rss
And maybe a link to your board?
https://jza80.de/phpBB/viewforum.php?f=63
And when you press the button to fetch all feeds manually, what's the result? Do you get a confirmation message, an error (what error exactly), etc?
Is said:

"Information

Simple RSS settings saved

« Back to previous page"
Are you even sure the feed has new items to post?
Yes, because they are newley added to the board and fetched for the first time
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by Ger »

The first one posts fine for me, I get 5 new topics posted as expected. You might try to delete that feed and then re-add it and change the settings as you wish.

The second doesn't work for me either, but I see that the underlying XML (from the RSS feed) isn't what I'd expect. When I parse the XML it only returns a title property for each item:

Code: Select all

object(SimpleXMLElement)[157]
  public '@attributes' => 
    array (size=1)
      'version' => string '2.0' (length=3)
  public 'channel' => 
    object(SimpleXMLElement)[158]
      public 'title' => 
        object(SimpleXMLElement)[159]
      public 'link' => string '#' (length=1)
      public 'subtitle' => string 'Customize as you please by changing the URL. The keyword before the .atom / .rss extension determines the result that is displayed' (length=130)
      public 'item' => 
        object(SimpleXMLElement)[160]
          public 'title' => string 'Poster of Toyota TT Supra MKIV 2JZ-GTE JZA80 Giant Huge Collage Print 54"x36"' (length=77)
Now this might be a limitation of SimpleXML, but I don't see how I could bypass that. I think I could try to build in a fallback to Curl but I need to think about that. It could just as well mean that the RSS feed doesn't meet with the standards.

ATM though, this feed simply doesn't work / isn't supported in SimpleRSS.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
lupus77
Registered User
Posts: 55
Joined: Fri Nov 21, 2014 6:44 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by lupus77 »

I have the same problem, and probably found the reason why it doesn't work for him or me.

The problem is the https <-> https transport. If I add an https feed, then I will get the entries. If I use an http feed, I won't get any.

I also have some encoding error from using https://rss.golem.de/rss.php?tp=games&feed=RSS2.0

Text looks like "Sasuke: Sony hat Firmware 4.5 für die Playstation 4 veröffentlicht". I used the latest version from github.

Edit: Scratch that, one of the two missing feed showed up, albeit incomplete. But the other is still missing, maybe http://swtorcantina.de/feed/ is an "invalid" format?

Edit2: This is weird. After deleting and readding, swtorcantina works.

Edit3: Can't bring this feed to work: https://pfannenstiel.blogger.de/rss , even though it seems to be ok from a quick look
Last edited by lupus77 on Thu Mar 09, 2017 5:09 pm, edited 2 times in total.
JackEnox
Registered User
Posts: 26
Joined: Fri Jan 27, 2017 1:55 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by JackEnox »

Ger wrote: Thu Mar 09, 2017 2:50 pm The first one posts fine for me, I get 5 new topics posted as expected. You might try to delete that feed and then re-add it and change the settings as you wish.
First one works now thanks. :)

BTW: Does it autopost when there are new items in the feed?
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by Ger »

lupus77 wrote: Thu Mar 09, 2017 4:12 pm Edit3: Can't bring this feed to work: https://pfannenstiel.blogger.de/rss , even though it seems to be ok from a quick look
It's in RDF format, not in RSS. Looks like that could be parsed as well, but it would take some logic in the extension to switch between RDF and RSS. Also, when I would add RDF I should as well add ATOM feeds as well.

So basically, it's not supported now in the extension.
JackEnox wrote: Thu Mar 09, 2017 4:22 pm
Ger wrote: Thu Mar 09, 2017 2:50 pm BTW: Does it autopost when there are new items in the feed?
It's linked to the phpBB cron, which is called every time a user (not a bot) visits your board. It's scheduled to run once every hour, but that also depends on how many users and other tasks you have. On a basically active board that would be sufficient. If it's not, you should setup your cron to be called from your hosting's cron service so it can be called more often.

When it runs, it checks the feeds for new items since the last time the feed has ran (manually or through cron).
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
lupus77
Registered User
Posts: 55
Joined: Fri Nov 21, 2014 6:44 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by lupus77 »

You should then probably rename this to Simple Feed post bot, when you support ATOM and RDF :D

But would be nice to see this added in some later versions.
thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by thekraken »

Hi - I ran into an issue when setting up my first RSS feed. Using 3.2. I installed per instructions - confirmed that my userid/forum/timeout/etc are correct - however when I fetch manually I receive:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/ger/simplerss/classes/driver.php on line 91: Invalid argument supplied for foreach()

Warning: Cannot modify header information - headers already sent by (output started at edited/path/includes/functions.php:3257) in edited/path/includes/functions_acp.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at edited/path/includes/functions.php:3257) in edited/path/includes/functions_acp.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at edited/path/includes/functions.php:3257) in /home/wizardfx/public_html/pl/includes/functions_acp.php on line 137
When I checked the error log - I see:

Code: Select all

Error while creating image
» Error in [ROOT]/ext/ger/simplerss/classes/driver.php on line 91: Invalid argument supplied for foreach()
RSS feed I am trying to use: http://www.funcom.com/rss

Any thoughts?
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by Ger »

thekraken wrote: Sat Mar 11, 2017 12:58 pm RSS feed I am trying to use: http://www.funcom.com/rss

Any thoughts?
It's an ATOM feed, not an RSS feed.

Sadly many sites call any feed "RSS" while sometimes it's ATOM of RDF. They have a different markup and my post bot doesn't parse those correctly.

I think the only way to prevent such errors is to either test for correct RSS format (and deny if no RSS) or magically detect the markup and add support for ATOM and RDF. The last option is probably the most favourable one, but it'll take me some time to read up on those formats and write the applicable code.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Simple RSS post bot

Post by thekraken »

Ger wrote: Mon Mar 13, 2017 1:06 pm It's an ATOM feed, not an RSS feed.
Hah - thanks so much for the clarity/sorry for the duplicate ask! :P
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger »

lupus77 wrote: Thu Mar 09, 2017 4:12 pm Edit3: Can't bring this feed to work: https://pfannenstiel.blogger.de/rss , even though it seems to be ok from a quick look
thekraken wrote: Sat Mar 11, 2017 12:58 pm RSS feed I am trying to use: http://www.funcom.com/rss
Both of you might like the latest update. I took me quite some work, but I have now added support for both RDF and ATOM feed types.

Please remove the current version of the extension from your board and update as described in the first post of this topic. If you don't follow those instructions you'll have quite some issues to work out.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Kaffe
Registered User
Posts: 74
Joined: Tue Nov 01, 2016 6:18 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by Kaffe »

Awesome update.. Have another coffee (Kaffe) :D
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger »

Thank you!
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by thekraken »

Ger wrote: Thu Mar 16, 2017 9:08 am Please remove the current version of the extension from your board and update as described in the first post of this topic. If you don't follow those instructions you'll have quite some issues to work out.
First off - thank you so much for the work! :) I am not seeing any posts. I followed instructions to the letter - disabled/deleted data/deleted files/uploaded new/enabled/added feed/gave 60 sec on timeout/0 text limit, forum selected & correct user id (which I logged in manually to confirm permissions/could post). I fetch manually and receive a green bar with:

Code: Select all

Information

ACP_FEEDPOSTBOT_SETTING_SAVED

« Back to previous page
I checked the log and see:

Code: Select all

Feed fetched
» http://www.funcom.com/rss
Any thoughts?
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.1][3.2][BETA] Feed post bot

Post by Ger »

I have tested with funcom, it worked for me. However, it's quite large, it holds more than 250 items to parse. You might hit your host's limits...
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
thekraken
Registered User
Posts: 8
Joined: Sat Mar 11, 2017 12:49 pm

Re: [3.1][3.2][BETA] Feed post bot

Post by thekraken »

Hosts limits in what way? I am running this on my own VPS to which I have root access. Assuming PHP limits - I scoured my server for some sort of error log to quantify just that but didnt find anything. I even adjusted my PHP script timeout setting to 5 minutes to test - and still have yet to generate an error or anything leading me to the "root cause" of why it wouldn't be working to spite getting a "success" message when running the manual fetch/no phpbb errors.
Locked

Return to “Extensions in Development”