Merge pull request #365 from garanews/patch-2

fix in case GSB value is missing
This commit is contained in:
Nils Kuhnert 2018-11-09 11:07:31 +01:00 committed by GitHub
commit b0041a6ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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