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.

CNN script

Old posts that have not been replied to for several years.
Locked
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

CNN script

Post by Alexander »

it dont work or..

CNN News v1.1 by Thrill - Loaded.

i have lynx in /usr/bin/lynx
and the temp dir is
/tmp/newstmp1.txt
/tmp/newstmp2.txt

when i typ '!new top' in the irc channel a new newstmp1.txt ,newstmp2.txt
is made with the latest news but no news in the irc channel??
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

are you getting any errors in the botchat?

don't forget to check and set where lynx is location as the script uses lynx to get the news...
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

no errors

and from the script:
# set the location of lynx here. Normally this should be ok.
set lynx "/usr/bin/lynx"

#set locations of tempfiles here, default /tmp/newstmp1.txt, newstmp2.txt should be ok
set ftemp1 "/tmp/newstmp1.txt"
set ftemp2 "/tmp/newstmp2.txt"

when i typ '!news top'
the latest news is saved to the newstmp1.txt.
but no news in the channel?
am i doing somthing wrong? sry for my bad english
Last edited by Alexander on Sat Feb 21, 2004 5:42 pm, edited 1 time in total.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

and lynx is definatly at /usr/bin/lynx

you can check where it is by typing:

whereis lynx

in the shell of the computer your bot is on
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

[quote="NewzBoy"]
whereis lynx

in the shell of the computer your bot is on[/quote]

shell ?
its on my second computer, running mandrake on it

wheresi lynx
lynx: /usr/bin/lynx /usr/share/lynx /usr/bin/man/man1/lynx.1.bz.2
Last edited by Alexander on Sat Feb 21, 2004 5:51 pm, edited 1 time in total.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

open a shell window (like you use to launch the bot) and type whereis lynx

that will tell you if/where lynx is installed

if it's not is the directory: /usr/bin/lynx
you'll need to change the script to point to what directory it's in
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

as i wrote in the first post
i have lynx in /usr/bin/lynx
and the temp dir is
/tmp/newstmp1.txt
/tmp/newstmp2.txt
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

when i typ wheresi lynx
lynx: /usr/bin/lynx /usr/share/lynx /usr/bin/man/man1/lynx.1.bz.2

but can i reinstall lynx anyway?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

What gave you the idea that lynx is the source of his problems? Since the tmp-files have content in them, the fetching part obviously went fine.
Have you ever read "The Manual"?
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

out of ideas :( want it to work

the only text i geting back from bot is when i typ
<me>!news
<bot>Please enter which news you would like to read (!news help)
<me>!news help
<bot>Usage: !news <item>
<bot>- top - Top Stories , world - World News
<bot>- us - US News , politics - Politics News
<bot>- weather - Weather News , business - Business News
<bot>- tech - Technology News, space - Space News
<bot>- health - Health News , entertain - Entertainment News
<bot>- sports - Sports News , travel - Travel News
<me>!news top

and nothing happens but newstmp1.txt is updating
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

well excuse me user - I was just offering a suggestion - I won't bother again.
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

nocomment
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Probably the format of the webpage changed, so the parsing stuff isn't working. To make sure, you should add putlog statements to check the values of certain variables. For instance, in this script you'll probably want to putlog the templine variable, and at least one inside the if statement to see if it ever executes (I'm guessing it doesn't). Then figure out what to change to make it work.
Locked