From addb75e7587b24ffd4aaa9d0dd563bfa51a6aeb9 Mon Sep 17 00:00:00 2001 From: Zhou Hao Date: Sat, 6 Aug 2016 21:22:33 +0800 Subject: [PATCH] Release pixivpy 3.2.0 with AppAPI supported (Experimental) --- .gitignore | 1 + README.md | 4 ++-- pixivpy3/api.py | 8 ++++---- setup.py | 7 +++++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 02909ba2..6542055c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ url.txt # pypi dist/ +PixivPy.egg-info/ MANIFEST diff --git a/README.md b/README.md index f300a7ba..b5936633 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ PixivPy [![Build Status](https://travis-ci.org/upbit/pixivpy.svg)](https://travi _Pixiv API for Python (with Auth supported)_ * [2016/07/27] Now `AppPixivAPI()` can call **without auth** (thanks [zzycami](https://github.com/zzycami)), check [demo.py](https://github.com/upbit/pixivpy/blob/b83578e066ddcba86295676d931ff3313d138b22/demo.py#L268) -* [2016/07/20] New **App-API** (Experimental) for `PixivIOSApp/6.0.8` +* [2016/07/20] New **App-API** (Experimental) for `PixivIOSApp/6.0.9` * [2016/07/11] Add new [iOS 6.x API](https://github.com/upbit/pixivpy/wiki#6x-api) reference to Wiki * [2015/12/02] Add write API for favorite an user / illust, release v3.1 * [2015/08/11] Remove SPAI and release v3.0 (pixivpy3) (Public-API with Search API) @@ -86,7 +86,7 @@ class AppPixivAPI(BasePixivAPI): # 用户收藏作品列表 (无需登录) def user_bookmarks_illust(self, user_id, restrict='public'): - # 作品排行 + # 作品排行 # mode: [day, week, month, day_male, day_female, week_original, week_rookie, day_manga] # date: '2016-08-01' # mode(r18榜单需登录): [day_r18, day_male_r18, day_female_r18, week_r18, week_r18g] diff --git a/pixivpy3/api.py b/pixivpy3/api.py index 4622c16b..30effe7e 100644 --- a/pixivpy3/api.py +++ b/pixivpy3/api.py @@ -62,8 +62,8 @@ def auth(self, username=None, password=None, refresh_token=None): headers = { 'App-OS': 'ios', 'App-OS-Version': '9.3.3', - 'App-Version': '6.0.8', - 'User-Agent': 'PixivIOSApp/6.0.8 (iOS 9.3.3; iPhone8,1)', + 'App-Version': '6.0.9', + 'User-Agent': 'PixivIOSApp/6.0.9 (iOS 9.3.3; iPhone8,1)', } data = { 'get_secure_url': 1, @@ -397,8 +397,8 @@ def __init__(self, **requests_kwargs): def no_auth_requests_call(self, method, url, headers={}, params=None, data=None, req_auth=False): headers['App-OS'] = 'ios' headers['App-OS-Version'] = '9.3.3' - headers['App-Version'] = '6.0.8' - headers['User-Agent'] = 'PixivIOSApp/6.0.8 (iOS 9.3.3; iPhone8,1)' + headers['App-Version'] = '6.0.9' + headers['User-Agent'] = 'PixivIOSApp/6.0.9 (iOS 9.3.3; iPhone8,1)' if (not req_auth): return self.requests_call(method, url, headers, params, data) else: diff --git a/setup.py b/setup.py index 93a0fce4..d8f5694f 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ import re -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup requires = ['requests'] @@ -13,7 +16,7 @@ name='PixivPy', packages=['pixivpy3'], version=version, - description='Pixiv API for Python', + description='Pixiv API for Python (with 6.x AppAPI supported)', author='upbit', author_email='rmusique@gmail.com', install_requires=requires,