ねぇ、君は何色になりたい?(呐,你想变成什么颜色的?)
Project description
Mashiro
呐,欢迎回到『さくら荘』
一成不变的日子,总觉得索然无味,但是,在夏天,捡了这只纯白色的猫,住进樱花庄后,我发现了,无聊的并不是时间,而是和平凡无奇的自己.
这是我的自用库——Mashiro。因为太菜懒了只好把几个常用的代码块做成函数打包发布.
用法
-
webget(u, encoding='utf-8')获取URL页面内容,返回字符串,可通过encoding指定编码. 自带随机UA. -
get(url, outfile)下载URL内容到本地(bin). 返回bool. 自带随机UA. -
btw(a,b,string)获取两个字符串之间的内容,返回list. -
mkdir(filepath)新建文件夹,如果文件夹存在自动跳过. -
readJSON(file_path, encoding='utf-8')读取JSON文件并加载为对象,可指定编码. -
debug(s,k)debug模式,用于显示变量内容(好像没什么用?). -
Sakurasou()随机返回一句樱花庄语录.
写在最后
以上几个函数足以应付普通的爬虫任务. emmmmmmmm不知道要写什么巴拉巴拉巴拉
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mashiro-0.2.1.tar.gz.
File metadata
- Download URL: mashiro-0.2.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83e9d26c131f955f503309c3a06ba53169957a53d2c87126b86f6992c6ac6b46
|
|
| MD5 |
e7edd03ddbaceca5e773e9966e2cb87c
|
|
| BLAKE2b-256 |
dce859cda5bd9f1ecd93d7e391d879f42aa21d7db65075fc726fadfea389b009
|
File details
Details for the file mashiro-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mashiro-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dfdc0f6bb89314d11101874ff5bb9122ed5c46e065b132c1185cdaf0f56cdf5
|
|
| MD5 |
0148bbb876abb501ad0c308ece0e1f0f
|
|
| BLAKE2b-256 |
22835b7a5a082130bcac7ec36c45208809fd13a0d05d47ad659b6d093f515f7f
|