A sao shen library
Project description
SaossionPage[骚神库]
The brother version of the Drissionpage library, SaossionPage, is referred to as Sao Shen for short
Installation
pip install SaossionPage
Usage
example 1: Print the tree structure of the element tag
from SaossionPage import Browser
if __name__ == '__main__':
browser = Browser(config=" ")
browser.open('https://www.doc88.com/')
t=browser.page.latest_tab
y=t.ele('t:body')
t.wait(2)
# 打印元素标签的树结构
browser.get_tree(y)
input(' press any key to exit')
example 2: Convert native HTML tag syntax to DP library element syntax
#将原生html标签语法转换成DP库元素语法
from SaossionPage import Browser,Use
if __name__ == '__main__':
#连接浏览器
b=Browser()
t=b.page.new_tab('https://www.baidu.com/')
#获取元素
search_botton=t.ele(Use.raw('<input type="submit" id="su" value="百度一下" class="bg s_btn">'))
print(search_botton)
input(' press any key to exit')
example 3: Foolish browser startup configuration
# 傻瓜式浏览器启动配置
from SaossionPage import Browser
if __name__ == '__main__':
# 连接浏览器 傻瓜式自动识别配置
browser = Browser( r"C:\Users\Application\chrome.exe",config=' 静音 无图 代理http://127.0.0.1:1080 ')
# 打开网站
browser.open('https://www.bing.com/')
input(' press any key to exit')
example 4: High-definition element screenshots
# 高清元素截图
from SaossionPage import Browser
if __name__ == '__main__':
browser = Browser(config=" ")
browser.open('https://www.python.org/')
t=browser.page.latest_tab
y=t.ele('t:body')
t.wait(2)
# 打印树结构
browser.get_shot_by_canvas(tab=t,ele=y,name='shot.png')
input(' press any key to exit')
Update log
-
1.0.3
add logo -
1.0.2
update README.md -
1.0.1
fix bug -
1.0.0
first release
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
SaossionPage-1.0.3.tar.gz
(95.0 kB
view details)
File details
Details for the file SaossionPage-1.0.3.tar.gz
.
File metadata
- Download URL: SaossionPage-1.0.3.tar.gz
- Upload date:
- Size: 95.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb1fe2d6f517bb6cf6a89bb6872b89e4384b8ebef8d5708d9f7f98726c38228 |
|
MD5 | bdfbe3e0c624db3f97555d3cb785bf53 |
|
BLAKE2b-256 | 24da6920a5b06e92393e7b65768400d08e0ddc4f303ab4ba9f667d7b54fbbd43 |