Skip to main content

python curl反防盗链抓取连接

Project description

python curl反防盗链抓取连接 ===

curl 反盗链抓取网页内容

源码地址: https://github.com/maicong/OpenAPI/blob/master/curl_get.php 翻译为python版

依赖 — 需要安装pycurl

pycurl安装时如果ssl backend不同会报错

import pycurl

ImportError: pycurl: libcurl link-time ssl backend (openssl) is differ ent from compile-time ssl backend (gnutls)

pip uninstall pycurl export PYCURL_SSL_LIBRARY=openssl pip install pycurl

Simple Usage —

from resist_hotlinking import curl_get

print curl_get(‘http://www.baidu.com’)

Project details


Release history Release notifications

This version
History Node

0.1.0

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page