Skip to content

Commit

Permalink
fix: Fix SniAPI host issue, upgrade requests to 2.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
upbit committed Sep 17, 2023
1 parent d144b42 commit e3fd590
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion example_bypass_sni.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

def main():
api = ByPassSniApi() # Same as AppPixivAPI, but bypass the GFW
api.require_appapi_hosts()
# api.require_appapi_hosts()
api.require_appapi_hosts(hostname="public-api.secure.pixiv.net")
# api.set_additional_headers({'Accept-Language':'en-US'})
api.set_accept_language("en-us")

Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ homepage = "https://github.com/upbit/pixivpy"
[tool.poetry.dependencies]
python = "^3.7"
cloudscraper = "^1.2.58"
requests = "^2.27.1"
requests-toolbelt = "^0.10.1"
requests = "^2.31.0"
requests-toolbelt = "^1.0.0"
urllib3 = "^2.0.0"
typing-extensions = "^4.1.1"

[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit e3fd590

Please sign in to comment.