Ruby on Rails Tuesday, May 12, 2015

On May 12, 2015, at 5:21 PM, Роман Ярыгин <330850@gmail.com> wrote:
>
> I stuck exactly on recursive algoritm. Can't find out how to build that recursive function

It's recursion, you call it again…

def start
get_subtree('/')
end

def get_subtree(url)
#fetch the page
#parse it
#for each link
#normalize the link
#if link not already visited
#add link to table of visited links
get_subtree(link)

No comments:

Post a Comment