Skip to content

Instantly share code, notes, and snippets.

View kamotlagh's full-sized avatar

kamotlagh kamotlagh

  • Tehran
  • 15:06 (UTC +03:30)
View GitHub Profile
@kamotlagh
kamotlagh / 0_urllib2.py
Created July 2, 2023 20:32 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()