Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Hackers of the world, unite!


computers / comp.mobile.android / python 05 requests view response body

SubjectAuthor
o python 05 requests view response bodyKyle Eddington

1
python 05 requests view response body

<d6705a1b-6b81-42da-9ad5-26c49a342b1bn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=48672&group=comp.mobile.android#48672

  copy link   Newsgroups: comp.mobile.android
X-Received: by 2002:a05:6214:548a:b0:67a:3897:e6a0 with SMTP id lg10-20020a056214548a00b0067a3897e6a0mr3373qvb.9.1703215679909;
Thu, 21 Dec 2023 19:27:59 -0800 (PST)
X-Received: by 2002:a05:6870:638c:b0:204:29f5:b26c with SMTP id
t12-20020a056870638c00b0020429f5b26cmr47908oap.5.1703215679533; Thu, 21 Dec
2023 19:27:59 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mobile.android
Date: Thu, 21 Dec 2023 19:27:59 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=58.26.140.93; posting-account=6s3XFQoAAABU19YxrRKH_HWmy3vqE4iF
NNTP-Posting-Host: 58.26.140.93
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d6705a1b-6b81-42da-9ad5-26c49a342b1bn@googlegroups.com>
Subject: python 05 requests view response body
From: kyleeddi...@gmail.com (Kyle Eddington)
Injection-Date: Fri, 22 Dec 2023 03:27:59 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Kyle Eddington - Fri, 22 Dec 2023 03:27 UTC

import requests
headers = {
'Host': 'https://www.topbagyes.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
} response = requests.get('https://www.topbagyes.com', headers=headers)
# html_str = response.text
# print(html_str)
"""View response body information"""
# response.request View request body information
"""Get response body data"""
print(response.text) # string
print(response.content) #Binary data, picture\video\audio
# print(response.json()) # json data, only standardized json data can be extracted using the json method, otherwise an error (JSONDecodeError) will be reported

print(response.headers) # View the response header information of the response body
print(response.encoding) #Specify response body encoding
print(response.apparent_encoding) # Automatically identify response body encoding
print(response.cookies)
print(response.cookies.get_dict()) # RequestsCookieJar to dictionary
print(response.url) # Get the url address of the response body
print(response.status_code) # Get the status code of the response body

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor