Discriminating good URLs

OK, I’ve been knocking around on this for a bit. Time for help. Not exactly a newbie, but my forte is other programming. For what it’s worth, I using script debugger.

This is the first half of a script (version ???) to copy good URLs over to Devonthink.

Works good with one exception, I keep getting Invalid URL notices even though when I click on the URL, it comes up if it’s valid.

Code follows:

use AppleScript version “2.4” – Yosemite (10.10) or later
use scripting additions

property docName : “antiwar.ooutline”
property colTitle : “URL”
property devApp : “DNtp”
property devDB : “websites”

global L
set L to {}

tell application “OmniOutliner”

if (exists document docName) then
	tell document docName
		set rowCount to the count of rows
		repeat with i from 1 to rowCount
			set theURL to (text of cell colTitle) of row i
				set urlFound to true
				GetURL theURL
			on error
				set urlFound to false
			end try
			if (urlFound = true) then
				if theURL is not in L then set end of L to theURL
			end if
		end repeat
	end tell
end if

end tell

Here’s a couple of the events log - don’t really know if the URL is good or not, but the GetURL returns “Invalid URL”.

get every text of cell “URL” of row 633 of document “antiwar.ooutline”
GetURL “https://www.wagingpeace.org/building-peace-literacy-corvallis-school-district/

TIA, for any assistance that can be rendered.