Skip to content

Commit

Permalink
update poetry to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplants committed Jan 12, 2025
1 parent 8a1c6e1 commit 4ffa391
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ repos:
rev: 2.2.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/python-poetry/poetry
rev: 2.0.0
hooks:
- id: poetry-check
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
Expand Down
5 changes: 4 additions & 1 deletion pixiv_bulk_downloader/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

class PixivBaseDownloader:
def __init__(
self, aapi: AppPixivAPI, login_info: LoginInfo, save_dir: Path
self,
aapi: AppPixivAPI,
login_info: LoginInfo,
save_dir: Path,
) -> None:
self.aapi = aapi
self.login_info = login_info
Expand Down
4 changes: 2 additions & 2 deletions pixiv_bulk_downloader/followings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def retrieve_following(self) -> list[UserInfo]:
now_retrieved_len,
),
)
self.rand_sleep(5.0)
self.rand_sleep(30.0)

return users

Expand Down Expand Up @@ -65,7 +65,7 @@ def extract_artist_info(
"illusts": self.retrieve_works(user_info.id),
},
)
self.rand_sleep(1.5)
self.rand_sleep(30.0)
return users

def get_all_following_works(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pixiv_bulk_downloader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def getch() -> str:
f.get_all_following_works()
print("\033[K[+]: Finish!")
print(
"[?]: Download all bookmarked? " f"({total_bookmark_len} works) (n/y): ",
f"[?]: Download all bookmarked? ({total_bookmark_len} works) (n/y): ",
flush=True,
end="",
)
Expand Down
Loading

0 comments on commit 4ffa391

Please sign in to comment.