mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-07 01:25:21 +00:00
fix in case GSB value is missing
I noticed that GSB value is not retrieved in json causing "index out of range" error. This fix checks if fields is available, otherwise go ahead. If this field is not available anymore we can skip it and remove also from template long. I don't find documentation about this.
This commit is contained in:
parent
c901627b8b
commit
09d3a35ed1
@ -58,7 +58,7 @@ class URLhaus:
|
||||
"link": cols[1].find("a").attrs.get("href"),
|
||||
"status": cols[2].text,
|
||||
"tags": cols[3].text.split(),
|
||||
"gsb": cols[4].text,
|
||||
"reporter": cols[5].text
|
||||
"gsb": cols[4].text if len(cols) > 5 else None,
|
||||
"reporter": cols[5].text if len(cols) > 5 else cols[4].text
|
||||
})
|
||||
return results
|
||||
|
Loading…
Reference in New Issue
Block a user