egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Eggdrop RSS Syndication (rss-synd) v0.5b1
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 25, 26, 27  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
assgier
Voice


Joined: 04 Oct 2004
Posts: 4

PostPosted: Thu Mar 25, 2010 8:19 pm    Post subject: Reply with quote

I'm hoping this thread is still being followed by Andrew, after all these years (and the latest post being from december last year).

Been using rss-synd for ages! It's working very well and I'm really happy about it.

One thing though: it seems to have trouble recognising self-closing tags in XML. It's either that, or it just doesn't allow tags (with the same name?) contained in other tags.. This is causing an error when using feedburner.com-urls, at least the one I'm trying to have listed in my channel: http://feeds.feedburner.com/TEDTalks_video.

The piece of their output-XML, that's causing this problem:
Code:

<itunes:category text="Arts">
       <itunes:category text="Design" />
</itunes:category>
<itunes:category text="Education">
       <itunes:category text="Higher Education" />
</itunes:category>
<itunes:category text="Science &amp; Medicine">
       <itunes:category text="Natural Sciences" />
</itunes:category>
<itunes:category text="Technology" />

As you can see, there's several "<itunes:category>"-tags. Some of them contained in other "<itunes:category>"-tags, some of them self-closing.

The error rss-synd returns:
Quote:

RSS Malformed Feed: Tag not closed: "<itunes:category>"


I have tried playing around a bit in the source-code, but I can't get it fixed... That's why I'm now asking you: can you have this fixed?

Thanks in advance!
Back to top
View user's profile Send private message
scotteh
Halfop


Joined: 29 Jan 2006
Posts: 50

PostPosted: Fri Mar 26, 2010 5:01 am    Post subject: Reply with quote

@assgier

You're right, the code couldn't handle self closing tags within a parent tag of the same name. Luckily its a very simple fix.

look for line:

Code:
incr tmp_num [regexp -all -- "<$tag_name\(|.\[^>\]+\)>" [string range $xml_data $last_tag_end_last $tag_end_last]]


and replace it with:

Code:
incr tmp_num [regexp -all -- "<$tag_name\(\[\\s\\t\\n\\r\]+\(\[^/>\]*\)?\)?>" [string range $xml_data $last_tag_end_last $tag_end_last]]


Edit: Fixed another bug in the regexp.
Back to top
View user's profile Send private message
Football
Master


Joined: 26 Dec 2008
Posts: 205
Location: Quakenet, #Football

PostPosted: Fri Mar 26, 2010 8:50 am    Post subject: Reply with quote

I`m a bit confused I looked through the script archieve and couldn't find this version, is it final & released?

IF so can someone post an update link to download it?
_________________
Idling at #Football, Quakenet.
Back to top
View user's profile Send private message
assgier
Voice


Joined: 04 Oct 2004
Posts: 4

PostPosted: Fri Mar 26, 2010 12:09 pm    Post subject: Reply with quote

scotteh wrote:
@assgier

You're right, the code couldn't handle self closing tags within a parent tag of the same name. Luckily its a very simple fix.

look for line:

Code:
incr tmp_num [regexp -all -- "<$tag_name\(|.\[^>\]+\)>" [string range $xml_data $last_tag_end_last $tag_end_last]]


and replace it with:

Code:
incr tmp_num [regexp -all -- "<$tag_name\(\[\\s\\t\\n\\r\]+\(\[^/>\]*\)?\)?>" [string range $xml_data $last_tag_end_last $tag_end_last]]


Edit: Fixed another bug in the regexp.

That solved it! Thanks Very Happy
Football wrote:
I`m a bit confused I looked through the script archieve and couldn't find this version, is it final & released?

IF so can someone post an update link to download it?

They are all here. The URL is mentioned in this topic's starting post.
Back to top
View user's profile Send private message
Football
Master


Joined: 26 Dec 2008
Posts: 205
Location: Quakenet, #Football

PostPosted: Fri Mar 26, 2010 1:43 pm    Post subject: Reply with quote

So it's not completed yet if it's a beta?
_________________
Idling at #Football, Quakenet.
Back to top
View user's profile Send private message
scotteh
Halfop


Joined: 29 Jan 2006
Posts: 50

PostPosted: Sat Mar 27, 2010 3:56 am    Post subject: Reply with quote

I'd suggest using v0.5b over v0.4, it's far more stable than any of the previous releases.
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Wed Mar 31, 2010 3:12 pm    Post subject: Reply with quote

You should use ::http::cleanup systematically (even if an error occurs) because after a long uptime, the memory is full of arrays that looks like $::http::561 and that contains the parsed web pages.

Thank you for this excellent script, I've been using it for years.
Back to top
View user's profile Send private message Visit poster's website
scotteh
Halfop


Joined: 29 Jan 2006
Posts: 50

PostPosted: Thu Apr 01, 2010 6:05 am    Post subject: Reply with quote

MenzAgitat wrote:
You should use ::http::cleanup systematically (even if an error occurs) because after a long uptime, the memory is full of arrays that looks like $::http::561 and that contains the parsed web pages.

Thank you for this excellent script, I've been using it for years.


Thanks, i've made the changes in the svn.

http://code.google.com/p/rss-synd/source/browse/trunk/
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Thu Apr 01, 2010 8:03 am    Post subject: Reply with quote

It works perfectly, thank you.
Back to top
View user's profile Send private message Visit poster's website
Anahel
Halfop


Joined: 03 Jul 2009
Posts: 48
Location: Dom!

PostPosted: Mon Apr 05, 2010 7:36 pm    Post subject: Reply with quote

hi there, i use v0.5b rss-synd and i use it in several channels, but i wanted to add another one but bot doesn't announce news there, channel name is #top_secret so i think bot fails at "_" in it's name (I've channels with "." "-" in their name and there announce works fine), maybe you know how to solve this problem?
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140

PostPosted: Mon Apr 12, 2010 1:56 pm    Post subject: Reply with quote

I installed the latest version from Google and get these on the console;

Code:
RSS HTTP Error: URLTOFEED (HTTP/1.1 503 Service Temporarily Unavailable)
RSS Warning: couldn't open "./scripts/feeds/one.db": no such file or directory.
RSS Database Error: couldn't open "./scripts/feeds/one.db": permission denied.


The feed is working fine in a new browser with cache emptied.
Back to top
View user's profile Send private message
fewyn
Voice


Joined: 28 Dec 2004
Posts: 15

PostPosted: Mon Apr 12, 2010 7:17 pm    Post subject: Reply with quote

RSS HTTP Error: http://www.worldofraids.com/wow-blue-tracker/0-all.xml (State: error)

Any ideas? I'm currently out of them Sad
Back to top
View user's profile Send private message AIM Address MSN Messenger
x0x
Op


Joined: 10 Feb 2009
Posts: 140

PostPosted: Tue Apr 13, 2010 6:21 pm    Post subject: Reply with quote

Resolved my previous error, setting file permissions can do the trick Wink

Is there some way to convert the long urls in some outputs to tinyurl or some other short url service automatically?
Back to top
View user's profile Send private message
scotteh
Halfop


Joined: 29 Jan 2006
Posts: 50

PostPosted: Wed Apr 14, 2010 8:31 am    Post subject: Reply with quote

@x0x
x0x wrote:
Resolved my previous error, setting file permissions can do the trick Wink

Is there some way to convert the long urls in some outputs to tinyurl or some other short url service automatically?


Check out Racle's post on the last page: http://forum.egghelp.org/viewtopic.php?p=92311#92311

@fewyn
fewyn wrote:
RSS HTTP Error: http://www.worldofraids.com/wow-blue-tracker/0-all.xml (State: error)

Any ideas? I'm currently out of them Sad


Search for:
Code:
   if {$state(status) != "ok"} {
      putlog "\002RSS HTTP Error\002: $state(url) (State: $state(status))"
      return 1
   }

And replace it with:
Code:
   if {[set status $state(status)] != "ok"} {
      if {$status == "error"} { set status $state(error) }
      putlog "\002RSS HTTP Error\002: $state(url) (State: $status)"
      ::http::cleanup $token
      return 1
   }

This should give you more information on what the exact error is.

@Anahel
Anahel wrote:
hi there, i use v0.5b rss-synd and i use it in several channels, but i wanted to add another one but bot doesn't announce news there, channel name is #top_secret so i think bot fails at "_" in it's name (I've channels with "." "-" in their name and there announce works fine), maybe you know how to solve this problem?


I've tested this, and underscores in a channels name works. I'd double check the channel name and make sure there aren't any 'hidden' control codes in it (colour, bold, reverse, etc...).
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140

PostPosted: Thu Apr 15, 2010 12:40 pm    Post subject: Reply with quote

Error error with the tinyurl patch.

I have set the following code:

Code:
#
# Misc Functions
##

proc tinyurl {url} {
 if {[info exists url] && [string length $url]} {
  if {[regexp {http://tinyurl\.com/\w+} $url]} {
   set http [::http::geturl $url -timeout 9000]
   upvar #0 $http state ; array set meta $state(meta)
   ::http::cleanup $http ; return $meta(Location)
  } else {
   set http [::http::geturl "http://tinyurl.com/create.php" \
     -query [::http::formatQuery "url" $url] -timeout 9000]
   set data [split [::http::data $http] \n] ; ::http::cleanup $http
   for {set index [llength $data]} {$index >= 0} {incr index -1} {
    if {[regexp {href="http://tinyurl\.com/\w+"} [lindex $data $index] url]} {
     return [string map { {href=} "" \" "" } $url]
 }}}}
 return ""
}


+

Code:
"output" "\\\[\002NEW\002\\\] @@item!title@@ - \[tinyurl @@item!link@@\]"




Error in the bot's console:

Code:
RSS Eval Error: Unknown option  , can be: -binary, -blocksize, -channel, -command, -handler, -headers, -keepalive, -method, -myaddr, -progress, -protocol, -query, -queryblocksize, -querychannel, -queryprogress, -strict, -timeout, -type, -validate


And channel output:

Code:
\[NEW\] Article Title - [tinyurl http://url.to.article]


Help! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 25, 26, 27  Next
Page 18 of 27

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber