Skip to content

Commit

Permalink
Parse out URLs from line fields instead of the overall API result.
Browse files Browse the repository at this point in the history
  • Loading branch information
smicallef committed Jul 6, 2021
1 parent 0eaf360 commit 5ea8774
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/sfp_searchcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ def handleEvent(self, event):
self.notifyListeners(evt)
self.results[email] = True

links = self.sf.extractUrls(str(results))
for link in links:
links = set()
for result in results:
if 'lines' in result:
for line in result['lines']:
links.update(self.sf.extractUrls(result['lines'][line]))

for link in list(links):
if link in self.results:
continue

Expand Down

0 comments on commit 5ea8774

Please sign in to comment.