又一个爬虫新轮子~
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 hashes)
Built Distribution
Close
Hashes for web_helper-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8c06ee9f791c2f99063baa54fc78c2f705259d0a754469dbd53936f072d198 |
|
MD5 | 1859a9f79a05844337cbb348a33e5235 |
|
BLAKE2b-256 | ea31c635ac60bac737b552c55cd55f4a5564865c014c55251e5da125720eca03 |