I just learned of this script thanks to another post here on Dovenet and I went through the process of setting up the modopts feed options and the timed event.
In attempting to run the event, however, I get error notifications and no joy on data being imported.
The text in the error log is as follows:
Sun Oct 18 17:03:15 2020
evnt FEEDIMP !JavaScript C:\sbbs\exec\web_feed_importer.js line 1: SyntaxError: illegal character
Sun Oct 18 17:03:15 2020
evnt FEEDIMP !JavaScript C:\sbbs\exec\web_feed_importer.js line 1: SyntaxError: illegal character
I know bugger all of Javascript or much else programming wise, so I can't even begin to debug this
myself - my first thoughts lead nowhere so now to ask you fellow hackers for help.
evnt FEEDIMP !JavaScript C:\sbbs\exec\web_feed_importer.js line 1:Can't really help you without having a look at the feed you're trying to import.
SyntaxError: illegal character
What is on line 1 of the file?
Re: web_feed_importer.js erroring out
By: Digital Man to Kurisu on Sun Oct 18 2020 06:13 pm
What is on line 1 of the file?
load("sbbsdefs.js");
Can't really help you without having a look at the feed you're trying to import.
Ah, that line number must be a red herring then.
not seeing anything happen when I poll https://www.theonion.com/rss
Ah, that line number must be a red herring then.
Ah, that line number must be a red herring then.
Has me for one heck of a loop, honestly.
Any options to try to run it with a verbose output that may shed light? The original post contains
It appears at least that it actually fails before the import can even happen - even if you clear the
[feed] section of modopts it results in the same error. In my rudimentary debugging I considered the
I suspect the error is coming from E4X, so it's 'line 1' of the XML document that's being parsed.
Difficult to give specific advice without knowing how you update and manage your system, but you may want to back up your exec/ directory structure and replace it with a fresh copy.
Given that went okay enough I decided to follow this suggestion replaced all the JS modules in my
exec folder with current ones pulled from git and got better results than before - running the timed
event no longer results in the previous error, but a new one regarding the server response being
"empty."
that error again I got a DIFFERENT one indicating my message base name was incorrect, which had not
shown before. Fixing that typo (I often incorrectly format my message base names when putting them
I'm not quite sure what I did to get it going. I played around with debugging in jsexec just to see
Cleaning up your exec directory likely solved the problem. It's hard to say why that was necessary. A bad update or bad edit in there is the likely culprit.
If you ever want to modify a script from exec/ or exec/load/, please copy the original script to your mods/ directory and then edit the copy in mods/. This keeps exec/ "clean" and separates your local changes from the stock scripts. More info here:
http://wiki.synchro.net/dir:mods
There's almost certainly a problem with one of the scripts that web_feed_importer is loading, or one of the scripts that one
of those scripts is loading, and so forth on down the line.
I have no such problem on my system, where all of the scripts are up to date as of a few minutes ago.
not seeing anything happen when I poll https://www.theonion.com/rss
When I visit the above in my browser, I'm redirected to 'https://theonion.com/rss'. Remove 'www.' from the URL and try again; maybe it'll work then.
evnt FEEDIMP !JavaScript C:\sbbs\exec\web_feed_importer.js line 1:
SyntaxError: illegal character
What is on line 1 of the file?
BBS. However the feeds from Politico result in an error. So if one feed doesn't work... maybe
'https://theonion.com/rss'. Remove 'www.' from the URL and try again;
When I do that I get a log entry "Empty Response from Server"
Could the SSL address be throwing things off?
'https://theonion.com/rss'. Remove 'www.' from the URL and try again;
When I do that I get a log entry "Empty Response from Server"
Could the SSL address be throwing things off?
Not sure; same thing is happening to me here. HTTPS shouldn't be a problem, but I'll have to take a
closer look and see what's up.
This little test script, run via jsexec, is able to load the feed andprint
some articles to my terminal. Please give it a try and let me know whatyou
see:
Also the code references the "body" element and that does not exist in this feed, they use "description" instead.
Looking at the output below and comparing it to the actual XML output, I think the culprit here lies in elements that are expressed with "CDATA".
We're seeing different results, so there's some difference in the code we're running on our systems. How up to date is your BBS, including the scripts in exec/ and exec/load/?
We're seeing different results, so there's some difference in the
code we're running on our systems. How up to date is your BBS,
including the scripts in exec/ and exec/load/?
I thought I was running latest version, I'll do a git pull and rebuild (with symlinks) and see what happens.
BBS. However the feeds from Politico result in an error. So if one
feed doesn't work... maybe
If you want to share the URL to a particular Politico feed that isn't working, I can take a look.
It would be fun if there was a modopts.ini option that would allow you to specify the "from" name for each feed. The
autogenerated names get kinda ugly.
This little test script, run via jsexec, is able to load the feed and print some articles to my terminal. Please give it a try and let me know what you see:
It would be fun if there was a modopts.ini option that would allow you to specify the "from" name for each feed. The
autogenerated names get kinda ugly.
Unfortunately the current configuration scheme doesn't allow for that sort of thing. The script either uses the contents of the 'author' field for each item as the 'from' address, or if that's empty/absent, uses 'Web Feed Importer'.
I'd really like to rewrite this script since there are a lot of things I'd do better/differently now - but I made some poor choices when I wrote it, so I'll need to be careful to avoid it creating a bunch of dupe messages.
I'm having some problems with https://www.theverge.com/rss/full.xml
So I'm using your test script, and nothing is coming out. But when I load it in Firefox the XML displays OK.
I'm having some problems with https://www.theverge.com/rss/full.xml
I've just pushed a couple of changes to exec/load/rss-atom.js which should help. A little more work may be needed; it's possible that not all of the fields (title, author, date, etc.) are being handled correctly for this type of feed. Too tired to dig deeper right now; please let me know if you see anything weird.
I've just pushed a couple of changes to exec/load/rss-atom.js which should help. A little more work may be needed; it's possible that not all of the fields (title, author, date, etc.) are being handled correctly for this type of feed. Too tired to dig deeper right now; please let me know if you see anything weird.
I'm getting periodic crashes with this updated script. It happens occasionally perhaps due to the content of one of the RSS feeds. When it happens SBBS dies completely, then restarts itself. There isn't an error in the System Journal other then lack of exit from RSSIN, then I see all the reload messages.
Is there something I can do that might provide more info on the crash?
Re: web_feed_importer.js erro
By: echicken to Bob Roberts on Tue Oct 20 2020 11:28 pm
I've just pushed a couple of changes to exec/load/rss-atom.js which should help. A little more work may be needed; it's possible that not all of the fields (title, author, date, etc.) are being handled correctly for this type of feed. Too tired to dig deeper right now; please let me know if you see anything weird.
Hi there,
I'm getting periodic crashes with this updated script. It happens occasionally perhaps due to the content of one of the RSS feeds. When it happens SBBS dies completely, then restarts itself. There isn't an error in the System Journal other then lack of exit from RSSIN, then I see all the reload messages.
Is there something I can do that might provide more info on the crash?
Probably not. I'd have to add a bunch of debug logging to the script so that we might figure out exactly when/why this is happening.
I'm thinking about creating a new project to handle viewing / importing feeds, but I probably won't get to that for a few weeks.
I'll try to figure out what feed it is, and let you know. My suspicion it's a missing xml tag or something that periodically happens based on whatever content they are running at the time.
That would be cool. Not sure if you're thinking of creating an external RSS "door", but I really like having them imported into the message bases,
This would be helpful:
http://wiki.synchro.net/howto:gdb
Re: web_feed_importer.js erro
By: Digital Man to Bob Roberts on Wed Oct 28 2020 09:59 am
This would be helpful:
http://wiki.synchro.net/howto:gdb
Okay, I think I've got the configuration done for core dumps, so if it happens again I'll try the gdb steps.
echicken wrote to Bob Roberts <=-
Re: web_feed_importer.js erro
By: Bob Roberts to echicken on Wed Oct 28 2020 08:32:21
That would be cool. Not sure if you're thinking of creating an external RSS "door", but I really like having them imported into the message bases,
I am thinking of that, but it would still be backed by a message
base. There would be an RSS reader module that you could browse
feeds from, but ultimately it's pulling data out of message
bases. You could hide those bases from your users or not, or use
the reader module or not. Could be a news ticker or scrolling
newsreader, that sort of thing.
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 579 |
Nodes: | 8 (0 / 8) |
Uptime: | 00:35:40 |
Calls: | 10,740 |
Files: | 5 |
Messages: | 444,492 |