[REBOL] error when processing multiple web pages!! Re:
From: al:bri:xtra at: 19-Aug-2000 20:16
akhar wrote:
> REBOL [
> Title: "e-mail finder"
> Date: 13-May-2000
> Author: "Stephane Jolicoeur"
> File: %octo.r
> Email: [akhar--bemail--org]
> Purpose: {
> To find urls within a file!!!
> }
> Comments: {
> do not use for SPAM
> }
> ]
> urls: make block!
Need a integer size after 'block!.
> text: make string! 0
> html-code: [
> thru "http://" copy url to newline (append urls url) |
> copy txt to "http:" (append text txt)
> ]
> page: read %urls.txt
> parse page [to "http://" some html-code]
> foreach url urls
Need a '[ after 'urls, as you're repeating the below code for each URL.
Have the line:
url: join http:// url
as it simplifies code.
> if exists? join http:// [url] [
Don't need '[ and '] around 'url.
> as: read join http:// [url]
Better as:
as: read url
> ;print url
> if find as "@" [
Above is better as:
either find as "@" [
BTW are you looking for URLs or email addresses in the page?
> print ["@" "fut trouver sur" url]
> newline
> print " "
Above is better as:
print ["@" "fut trouver sur" url newline
> ] print "cannot find it"
Above is better as:
] [print "cannot find it"] ; Other branch of 'either.
> clear as
No need for above line
> ][print ["je ne peux acceder ce site:" url]]
I'm fairly sure this line isn't needed.
> ];
No need for semi-colon in above line.
> as: ask "done??"
This line should be moved above the '[ above.
Fix these problems and your problem should be solved for all sites that
don't require cookies, or that don't require specific browsers.
I hope that helps! Good luck.
Andrew Martin
ICQ: 26227169
http://members.xoom.com/AndrewMartin/