Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gl3w_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import argparse
import os
import re
import ssl

# Try to import Python 3 library urllib.request
# and if it fails, fall back to Python 2 urllib2
Expand Down Expand Up @@ -87,6 +88,8 @@ def download(url, dst):
print('Reusing {0}...'.format(dst))
return

ssl._create_default_https_context = ssl._create_unverified_context

print('Downloading {0}...'.format(dst))
web = urllib2.urlopen(urllib2.Request(url, headers={'User-Agent': 'Mozilla/5.0'}))
with open(dst, 'wb') as f:
Expand Down