mIRC Home    About    Download    Register    News    Help

Print Thread
#66065 30/12/03 10:03 PM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
Hi

I have a webpage that I'm retrieving headlines from - unfortunatly the page seems to be too big to write to a txt file, so I'm trying to identify the line I need. The problem is that there is no html or other unique text around the headline - just blank space and even that is repeated numerous time above it. Is it possible to state a specific line number in the script for the sock to read from the webpage, similar to how you can in $read for a text file?
Thanks.


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#66066 31/12/03 12:50 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Is it safe to assume the headline you're trying to gather is the red postion on the link in your signature?

If you're using sockets, use:

/sockread -f &data
/bwrite myfile.htm -1 -1 &data

that will write the complete contents of the webpage to myfile.htm. From there, use the on SOCKCLOSE event to read a specific line, then use /remove to remove the file when you're done! >:P


-KingTomato
#66067 31/12/03 03:12 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
Hi KT

The page I'm trying to get is:
http://keyinvest.ibb.ubs.com/ki/de/en/newstraderstalk/news.ki?newssectorid=ki_gn

The headline at the top of the Reuters news list...it's a tricky one as there is no html around it, so the only way I can think of is to have the whole page dumped to a file and then specify a line number to read to the channel !

Thanks!


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#66068 31/12/03 04:25 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Do the method I told you for the sockread, then just read the lince number from the text file it creates on the sock close >:P


-KingTomato
#66069 31/12/03 04:34 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
just tried again - dosnt write all the page to the htm file - just the header stuff
confused


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#66070 31/12/03 04:53 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
got it going - was missing the goto nextread line

thanks KT smile


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net

Link Copied to Clipboard