Skip to content

Instantly share code, notes, and snippets.

View lel-amri's full-sized avatar

Léo lel-amri

  • France
  • 03:51 (UTC +01:00)
View GitHub Profile
@lel-amri
lel-amri / 0_urllib.py
Last active February 17, 2018 14:41 — forked from kennethreitz/0_urllib2.py
Python3: urllib vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib.request
gh_url = 'https://api.github.com'
req = urllib.request.Request(gh_url)
password_manager = urllib.request.HTTPPasswordMgrWithDefaultRealm()