Skip to main content

又一个爬虫新轮子~

Project description

WebHelper

Web 爬虫小工具

安装

pip install web-helper

使用方法

from web_helper import *

title = get_html(f'https://baidu.com', obey_robot=False).to_soup().find('title').text
assert title == '百度一下,你就知道'

使用代理

from web_helper import *

set_global_random_proxy('ws_token')  # 设置全局代理,TOKEN 前往: https://proxy.webshare.io/subscription/ 获取
title = get_html(f'https://baidu.com', obey_robot=False).to_soup().find('title').text
assert title == '百度一下,你就知道'

设置日志级别

from web_helper import *
import sys

logger.remove()
logger.add(sys.stdout, level="TRACE")

title = get_html(f'https://baidu.com', obey_robot=False).to_soup().find('title').text
assert title == '百度一下,你就知道'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

web_helper-0.1.7.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

web_helper-0.1.7-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file web_helper-0.1.7.tar.gz.

File metadata

  • Download URL: web_helper-0.1.7.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for web_helper-0.1.7.tar.gz
Algorithm Hash digest
SHA256 68dc5d0b8e7112164e6e12cbbd36e89f88272f9a7826197b87996dbbd399f96b
MD5 230d774abc15d95cc05c56809498589a
BLAKE2b-256 9349fe44607fae5d2a75d37f3ed6d065d146ff8072ef6b59be9e5e27b5c259e0

See more details on using hashes here.

File details

Details for the file web_helper-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: web_helper-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for web_helper-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9c8c06ee9f791c2f99063baa54fc78c2f705259d0a754469dbd53936f072d198
MD5 1859a9f79a05844337cbb348a33e5235
BLAKE2b-256 ea31c635ac60bac737b552c55cd55f4a5564865c014c55251e5da125720eca03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page