World's Best AI Learning Platform with profoundly Demanding Certification Programs
Designed by IITian's, only for AI Learners.
Download our e-book of Introduction To Python
4 (4,001 Ratings)
218 Learners
Jignesh Kumar
5 months ago
import requests
r = requests.get('https://httpbin.org/')
print(r.text)[:200]
<!DOCTYPE html >
<html lang="en">
<head>
<meta charset="UTF-8">
<title>httpbin.org</title>
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+
import requests
s = requests.Session()
s.get('http://httpbin.org/cookies/set/sessioncookie/31251425')
r = s.get('http://httpbin.org/cookies')
print(r.text)
{"cookies":{"sessioncookie":"31251425"}}
requests.get('http://github.com', timeout=10.001)