This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Eggdrop RSS Syndication (rss-synd) v0.5b1

Support & discussion of released scripts, and announcements of new releases.
Post Reply
G
Glavata
Voice
Posts: 2
Joined: Thu Oct 08, 2009 4:45 pm

SkySports Feed Problem

Post by Glavata »

Hey Guys,
I have a problem with the SkySports Premier League (or any of the football feeds for that matter). It seems new news items don't get always added to the top of the feed but sometimes anywhere throughout the feed (it holds 20 news items.) The script ends up missing lots of news and doesn't report them to the channel, even though they are being parsed and stored in the .db file. Anyone have any ideas to fix this?

I'm using v0.5b1 and here are my settings:

set rss(skysportsepl) {
"url" "http://www.skysports.com/rss/0,20514,11661,00.xml"
"update-interval" 1
"announce-output" 20
"database" "./scripts/skysportsepl.db"
"output" "[\00315SkySports\0034EPL\003] @@item!title@@ - @@item!link@@"
"trigger" "!skysportsepl"
}


set default {
"announce-output" 3
"trigger-output" 10
"remove-empty" 1
"trigger-type" 0:2
"announce-type" 0
"max-depth" 1
"evaluate-tcl" 0
"update-interval" 30
"output-order" 1
"timeout" 60000
"channels" "#bul"
"trigger" "!rss @@feedid@@"
"output" "\[\002@@channel!title@@@@title@@\002\] @@item!title@@@@entry!title@@ - @@item!link@@@@entry!link!=href@@"
"user-agent" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
}

Thanks !
s
scotteh
Halfop
Posts: 50
Joined: Sun Jan 29, 2006 12:43 am

Post by scotteh »

The script uses rather simple checking to figure out what items are new. It will check each item in the feed against the cache and announce them until a match is found.

It would be somewhat possible to get around SkySports is doing. The checking could be changed to announce all unknown items. If you understand the basics of TCL it shouldn't be too hard to hack in.
w
woodsdog
Voice
Posts: 4
Joined: Fri Jan 06, 2006 5:20 pm

Post by woodsdog »

luminoso wrote:i'm having this error 99% of the time to every feed that i have:

Code: Select all

[22:34] RSS HTTP Error: http://abandonados.info/?feed=rss2 (State: timeout)
[22:34] RSS HTTP Error: http://feeds2.feedburner.com/720pMoviesRss (State: timeout)
[22:34] RSS HTTP Error: http://pipes.yahoo.com/pipes/pipe.run?_id=04227f4f9c0fa081406cb5694821ae1a&_render=rss (State: timeout)
[22:35] RSS HTTP Error: http://feeds2.feedburner.com/Canalfoto_novidades (State: timeout)
[22:35] RSS HTTP Error: http://feeds2.feedburner.com/Canalfoto_news (State: timeout)
[22:35] RSS HTTP Error: http://abandonados.info/?feed=comments-rss2 (State: timeout)
I have been getting these also over the last month. It's strange, eggdrop will start up, and rss-synd will run fine for about an hour, maybe two. Then nothing, just these errors in the log file!

I need my RSS feeds! :?
s
scotteh
Halfop
Posts: 50
Joined: Sun Jan 29, 2006 12:43 am

Post by scotteh »

Have you tried uping the timeout? Out of interest what tcl & http package versions are you using?
w
woodsdog
Voice
Posts: 4
Joined: Fri Jan 06, 2006 5:20 pm

Post by woodsdog »

scotteh wrote:Have you tried uping the timeout? Out of interest what tcl & http package versions are you using?
I am running this on Ubuntu 9.0.4.

I am using the Ubuntu eggdrop:

ii eggdrop 1.6.19-1.1ubuntu1.9.04.1

tcl is version 8.5.6-3 (Ubuntu version)

I'm not sure what you mean by http.

thanks for your help..
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

Hi.

I want that my eggdrop read of this web:

http://rss.coveritlive.com/rss.php?altc ... 8ef87c2096

And i want that my eggdrop put in my channel this:

Code: Select all

<Myeggdrop> [Slashdot] 2:03  - La emoción invade a Diego!!!!
<Myeggdrop> [Slashdot] 2:04  - Bien. Esto ha sido todo por nuestra parte. Veremos a Argentina en verano, en Sudáfrica. Y a ustedes les agradecemos la atención, les deseamos buena noche y hasta la próxima!
can help me?
m
moodperson
Voice
Posts: 1
Joined: Sat Nov 14, 2009 12:17 pm

Post by moodperson »

hi,
I want to read rss news from the page, which is protected by php authorization.
So before get rss, I need go to takelogin.php with username, password and cookies must be enabled.
In tcl it looks like this:

Code: Select all

package require http                                                                                                                                                                                    
set login [::http::formatQuery username rss_user password rss_password ]                                                                                                                                                                                                                 
set tok [::http::geturl http://domain.com/takelogin.php -query $login]                                                                                                                                         
upvar \#0 $tok state                                                                                                                                                                                              
set cookies [list]                                                                                                                                                                                                
foreach {name value} $state(meta) {                                                                                                                                                                               
    if { $name eq "Set-Cookie" } {                                                                                                                                                                                
        lappend cookies [lindex [split $value {;}] 0]                                                                                                                                                             
    }                                                                                                                                                                                                             
}                                                                                                                                                                                                                
::http::cleanup $tok                                                                                                                                                                                              
                                                                                                                                                                                                                  
set tok2 [::http::geturl http://domain.com/rss.php -headers [list Cookie [join $cookies {;}]]]                                                                                                                 
.... here some code ...                                                                                                                                                                                                     
::http::cleanup $tok2 
but how this code can add to rss-synd.tcl? I have no idea.
g
guid0
Voice
Posts: 2
Joined: Fri Dec 04, 2009 4:30 am

Post by guid0 »

woodsdog wrote:
luminoso wrote:i'm having this error 99% of the time to every feed that i have:

Code: Select all

[22:34] RSS HTTP Error: http://abandonados.info/?feed=rss2 (State: timeout)
[22:34] RSS HTTP Error: http://feeds2.feedburner.com/720pMoviesRss (State: timeout)
[22:34] RSS HTTP Error: http://pipes.yahoo.com/pipes/pipe.run?_id=04227f4f9c0fa081406cb5694821ae1a&_render=rss (State: timeout)
[22:35] RSS HTTP Error: http://feeds2.feedburner.com/Canalfoto_novidades (State: timeout)
[22:35] RSS HTTP Error: http://feeds2.feedburner.com/Canalfoto_news (State: timeout)
[22:35] RSS HTTP Error: http://abandonados.info/?feed=comments-rss2 (State: timeout)
I am getting the exact same thing. even when connecting to a local host :|

Code: Select all

09:02 <bugger> [09:02] RSS Syndication Script v0.5b1 (2007-12-17): Loaded.
09:02 <bugger> [09:02] Userfile loaded, unpacking...
09:04 <bugger> [09:04] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:07 <bugger> [09:07] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:11 <bugger> [09:11] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:15 <bugger> [09:15] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:18 <bugger> [09:18] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:21 <bugger> [09:21] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:24 <bugger> [09:24] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
09:27 <bugger> [09:27] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
Anyone had any luck tackling this? I am running tcl v8.5.7 with build-in http.
g
guid0
Voice
Posts: 2
Joined: Fri Dec 04, 2009 4:30 am

Post by guid0 »

Code: Select all

09:02 <bugger> [09:02] RSS Syndication Script v0.5b1 (2007-12-17): Loaded.
09:02 <bugger> [09:02] Userfile loaded, unpacking...
09:27 <bugger> [09:27] RSS HTTP Error: http://127.0.0.1/bugzilla.xml (State: timeout)
it seems fixed after rebuilding dev-lang/tcl perl-core/PodParser perl-core/Test-Harness (gentoo linux)[/quote]
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

i have a error when there is a & then the bot dies ? how can i fix that?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

No one? :cry:

Here is the debug, if it helps

Code: Select all

Debug (eggdrop v1.6.19) written Wed Dec  9 19:54:17 2009
Full Patch List: 
Tcl library: /usr/share/tcltk/tcl8.5
Tcl version: 8.5.3 (header version 8.5.3)
Tcl is threaded
Compile flags: gcc -pipe -g -O2 -g -Wall -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H  
Link flags: gcc -pipe
Strip flags: touch
Context: tclhash.c/695, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: ::rss-synd::feed_get, param:  $_time1 $_time2 $_time3 $_time4 $_time5]
         tclhash.c/695, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: *raw:PING, param:  $_raw1 $_raw2 $_raw3]
         tclhash.c/695, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: <null>, param:  $_raw1 $_raw2 $_raw3]
         tclhash.c/695, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: ::tvrage::announceShows, param:  $_time1 $_time2 $_time3 $_time4 $_time5]
         tclhash.c/695, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: ::rss-synd::feed_get, param:  $_time1 $_time2 $_time3 $_time4 $_time5]
         tclhash.c/695 []

Compiled without extensive memory debugging (sorry).
Open sockets: 7 (listen), 9, 11, 10 (file), done.
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
s
scotteh
Halfop
Posts: 50
Joined: Sun Jan 29, 2006 12:43 am

Post by scotteh »

Fire-Fox wrote:i have a error when there is a & then the bot dies ? how can i fix that?
An '&' where? Could you could show me the tcl error you get in partyline before the eggdrop dies?
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

And & when the rss feed is showing it in the irc channel...

so i would say the script can't handle & char
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

no one?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
R
Racle
Voice
Posts: 1
Joined: Mon Mar 01, 2010 3:36 am

Post by Racle »

x0x wrote:Really strange, even with 10000 as timeout I get output like;

\[Reuters\] Crews find more bodies from Air France crash - [maketiny ]

I changed the output to 60000 but same result. Only then I noticed the output comes (almost) straight away each time. Maybe something else is wrong about the code?

Code: Select all

	set rss(Reuters) {
		"url"			"http://feeds.reuters.com/reuters/topNews"
		"channels"		"#chan"
		"database"		"./scripts/feeds/reuters.db"
                "output"      "\\\[\002Reuters\002\\\] @@item!title@@ - \[maketiny @@entry!link@@\]" 
		"trigger"		"!@@feedid@@"
		"evaluate-tcl"	1
                "announce-output" 1
	}

Code: Select all

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 ""
} 
Working tinyurl code. just add this after line

Code: Select all

#
# Misc Functions
##
and working output is:

Code: Select all

      "output"      "\\\[\002Iltalehti\002\\\] @@item!title@@ - \[tinyurl @@item!link@@\]"
Post Reply