Your post does not provide many details, but I think what you are looking for is a generator function., Instead of returning an URL,
yield each URL, like this:
def generateURLs(startingURL):
url = startingURL
...
while url:
yield url
url = getNextURL(url)
...
for url in generateURLs(http://click.someurl.net/script?query=somedata):
print url
Reputation Points: 20
Solved Threads: 25
Junior Poster in Training
Offline 81 posts
since Nov 2009