From 797bac799a226a18c4d9652473c43033faffe6fc Mon Sep 17 00:00:00 2001 From: cccs-rs Date: Tue, 30 Aug 2022 19:24:10 +0000 Subject: [PATCH] fix UnboundLocalError --- urldownloader/urldownloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urldownloader/urldownloader.py b/urldownloader/urldownloader.py index 848af9a..05799f8 100644 --- a/urldownloader/urldownloader.py +++ b/urldownloader/urldownloader.py @@ -54,10 +54,10 @@ def execute(self, request: ServiceRequest) -> None: # Make sure this is the first URL fetched urls = [(submitted_url, 10000)] if submitted_url and request.task.depth == 0 else [] + tags = request.task.tags # Distinguish between only fetching the submitted_url vs all in the submission if not request.get_param('submitted_url_only'): # Only concerned with static/dynamic URIs found by prior services - tags = request.task.tags urls.extend(tags.get('network.static.uri', []) + tags.get('network.dynamic.uri', [])) request.temp_submission_data.setdefault('visited_urls', {})