Skip to main content
drequests
=======

Before install drequests,make sure had installed pydomain("sudo pip install pydomain")

drequests is an Apache2 Licensed HTTP library, written in Python, for human beings.

Python’s standard pycurl2 module provides most of the HTTP capabilities you need, but the API is thoroughly broken. It was built for a different time — and a different web. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks..

Things shouldn’t be this way. Not in Python.
>>>from drequests import DRequests
>>>resp = DRequests(url = 'http://www.piadu.com')
>>>resp.status_code
200
>>>resp.text
<html ....


1.3

e.g.
from drequests import DRequests
url = 'http://www.piadu.com'
resp = DRequests(url = url,referer = url,useragent = "Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1",followlocation = 1)
#取响应码
code = resp.status_code
#取响应头
header = resp.headers
#取页面内容
html = resp.text

#修改获取IP方式,以前使用socket获取,现在改为使用pycurl2直接获取。

Release files for drequests 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drequests 1.3
File Size Uploaded
drequests-1.3.tar.gz 4.9 kB Details

Release files / drequests-1.3.tar.gz

Download URL drequests-1.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
772db3142237e2cbf56dfab4ce62c2dd65a3d6b11df0ec2f3381df69d32ea784
BLAKE2b-256 checksum
How to use checksums
7b9a6c979bffb25d369404bce55cfbe1c5e325b139cc8ad62f714b215e16a668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file

1.2

1 release file

1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page