Python Forum
Requests in Python for Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Requests in Python for Windows
#6
Yes and a much better choice than urllib.request.
You don't have to guess on encoding,you get the right encoding
As just one example why is better.
import requests

url = 'http://google.com'
rdata = requests.get(url)
print(rdata.encoding) # ISO-8859-1
print(rdata.text) # Source code
It's a popular kid Cool
Quote:Requests is one of the most downloaded Python packages of all time,
pulling in over 7,000,000 downloads every month. All the cool kids are doing it!
Reply


Messages In This Thread
Requests in Python for Windows - by perthpython - Nov-13-2016, 03:10 AM
RE: Requests in Python for Windows - by snippsat - Nov-13-2016, 03:23 AM
RE: Requests in Python for Windows - by Larz60+ - Nov-13-2016, 03:34 AM
RE: Requests in Python for Windows - by snippsat - Nov-13-2016, 03:39 AM
RE: Requests in Python for Windows - by Larz60+ - Nov-13-2016, 03:44 AM
RE: Requests in Python for Windows - by snippsat - Nov-13-2016, 03:57 AM
RE: Requests in Python for Windows - by perthpython - Nov-13-2016, 05:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python requests library .JSON() error mHosseinDS86 6 3,896 Dec-19-2022, 08:28 PM
Last Post: deanhystad
  Python requests oauth2 access token herobpv 6 4,243 Sep-27-2021, 06:54 PM
Last Post: herobpv
  Python Requests SSL Aussie 0 2,062 Jan-07-2021, 02:09 AM
Last Post: Aussie
  Python Requests Aussie 2 2,865 Dec-23-2020, 03:24 AM
Last Post: Aussie
  Python Requests package: Handling xml response soumyarani 1 2,277 Sep-14-2020, 11:41 AM
Last Post: buran
  Python API and requests deep_logic 9 4,618 Jul-29-2020, 03:47 PM
Last Post: ndc85430
  How to save Python Requests data sent to server? RedLeonard 5 5,434 Jul-05-2020, 10:33 AM
Last Post: RedLeonard
  How to do the same as python -m requests.certs inside script? geekgeek 2 2,392 Feb-27-2020, 07:11 AM
Last Post: buran
  Python requests writes the name of the file instead of contents to web page bluethundr 1 2,252 Jun-05-2019, 09:35 PM
Last Post: Larz60+
  Python requests module doesn not return status_code palo173 5 3,630 May-21-2019, 09:22 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020