Skip to content

Commit

Permalink
Fix key error in stackexchange
Browse files Browse the repository at this point in the history
  • Loading branch information
thehermit committed Feb 10, 2019
1 parent 3563340 commit ae9b1bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pastehunter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def paste_scanner():
logger.debug("Found New {0} paste {1}".format(paste_data['pastesite'], paste_data['pasteid']))
# get raw paste and hash them

raw_paste_uri = paste_data['scrape_url']
# Cover fetch site SSLErrors

try:

# Stack questions dont have a raw endpoint
Expand All @@ -152,8 +151,10 @@ def paste_scanner():
del paste_data['body']

else:
raw_paste_uri = paste_data['scrape_url']
raw_paste_data = requests.get(raw_paste_uri).text

# Cover fetch site SSLErrors
except requests.exceptions.SSLError as e:
logger.error("Unable to scan raw paste : {0} - {1}".format(paste_data['pasteid'], e))
raw_paste_data = ""
Expand Down

0 comments on commit ae9b1bd

Please sign in to comment.