Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chadskelton committed Jun 25, 2019
1 parent dacde65 commit 78a6e45
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scraper.py
Expand Up @@ -14,6 +14,20 @@
import scraperwiki
from datetime import datetime
from BeautifulSoup import BeautifulSoup
import ssl

# trying to disable security certificate thing

try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context

# end of doing that

br = mechanize.Browser()
br.set_handle_robots(False)
Expand Down

0 comments on commit 78a6e45

Please sign in to comment.