mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-13 05:56:07 +02:00
Move append into for-loop. This allows mutliple web sites per entry to be added.
This commit is contained in:
parent
3aec59d500
commit
8df5c66813
|
@ -622,8 +622,6 @@ def main():
|
|||
try:
|
||||
if entry['urls'][n]['type'] == "WEBSITE":
|
||||
website_url = entry['urls'][n]['url']
|
||||
except NameError as ne:
|
||||
logging.error("Error in %s: 'url' key missing (%s)" % (repr_entry(entry), entry['urls'][n]))
|
||||
if website_url:
|
||||
input_entries.append({
|
||||
"url": website_url,
|
||||
|
@ -632,6 +630,8 @@ def main():
|
|||
"district": entry.get("district"),
|
||||
"city": entry.get("city"),
|
||||
})
|
||||
except NameError as ne:
|
||||
logging.error("Error in %s: 'url' key missing (%s)" % (repr_entry(entry), entry['urls'][n]))
|
||||
|
||||
|
||||
# randomize order, to distribute requests over servers
|
||||
|
|
Loading…
Reference in a new issue