diff --git a/__init__.py b/__init__.py index 81ca815..338f5d3 100644 --- a/__init__.py +++ b/__init__.py @@ -12,10 +12,15 @@ def resolve(url): return {} def recurse(url): + previous_result = {} + while True: result = resolve(url) - if 'url' not in result: + if result == {}: + return previous_result + elif 'url' not in result: return result url = result['url'] + previous_result = result