Skip to content

Commit

Permalink
chore: change name to baidu_image_crawling
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Jan 15, 2025
1 parent db571b9 commit b02bd95
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/SyncToGitee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
force_update: true
static_list: "BaiduImageSpider"
static_list: "BaiduImageCrawling"
debug: true
4 changes: 2 additions & 2 deletions .github/workflows/publish_whl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push baidu_image_spider to pypi
name: Push baidu_image_crawling to pypi

on:
push:
Expand Down Expand Up @@ -50,5 +50,5 @@ jobs:
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.BAIDUIMAGESPIDER }}
password: ${{ secrets.BaiduImageCrawling }}
packages_dir: dist/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
## Baidu Image Spider
## Baidu Image Crawling

一个超级轻量的百度图片爬虫, modified from <https://github.com/kong36088/BaiduImageSpider>
一个超级轻量的百度图片爬虫, modified from <https://github.com/kong36088/BaiduImageCrawling>

### 安装

```bash
pip install baidu_image_spider
pip install baidu_image_crawling
```

### Python使用

```python
from baidu_image_spider.main import Crawler
from baidu_image_crawling.main import Crawler

crawler = Crawler(0.05, save_dir="outputs") # 抓取延迟为 0.05

Expand All @@ -22,14 +22,14 @@ crawler(word="美女", total_page=2, start_page=1, per_page=30)
### 终端使用

```bash
baidu_image_spider -w 美女 -tp 1 -sp 1 -pp 2
baidu_image_crawling -w 美女 -tp 1 -sp 1 -pp 2
```

查看参数文档:

```bash
$ baidu_image_spider -h
usage: baidu_image_spider [-h] -w WORD -tp TOTAL_PAGE -sp START_PAGE [-pp [PER_PAGE]] [-sd SAVE_DIR] [-d DELAY]
$ baidu_image_crawling -h
usage: baidu_image_crawling [-h] -w WORD -tp TOTAL_PAGE -sp START_PAGE [-pp [PER_PAGE]] [-sd SAVE_DIR] [-d DELAY]

options:
-h, --help show this help message and exit
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion demo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: [email protected]
from baidu_image_spider.main import Crawler
from baidu_image_crawling.main import Crawler

crawler = Crawler(0.05, save_dir="outputs") # 抓取延迟为 0.05

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_readme():
return readme


MODULE_NAME = "baidu_image_spider"
MODULE_NAME = "baidu_image_crawling"
obtainer = GetPyPiLatestVersion()
try:
latest_version = obtainer(MODULE_NAME)
Expand All @@ -47,7 +47,7 @@ def get_readme():
description="Baidu Image Spider",
author="SWHL",
author_email="[email protected]",
url="https://github.com/SWHL/BaiduImageSpider",
url="https://github.com/SWHL/BaiduImageCrawling",
license="Apache-2.0",
include_package_data=True,
install_requires=read_txt("requirements.txt"),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

sys.path.append(str(root_dir))

from baidu_image_spider.main import main
from baidu_image_crawling.main import main


@pytest.mark.parametrize(
Expand Down

0 comments on commit b02bd95

Please sign in to comment.