SHARE
TWEET

Untitled

a guest Mar 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import requests
  2.  
  3.  
  4. class Response:
  5.     def __init__(self, url):
  6.         self.response = requests.get(url)
  7.  
  8.     def status_code(self):
  9.         return self.response.status_code
  10.  
  11.     def headers(self):
  12.         return self.response.headers
  13.  
  14.     def content_lenght(self):
  15.         return self.response.headers['content_lenght']
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top