yuki-2000 / pixiv_downloader Goto Github PK
View Code? Open in Web Editor NEWpythonのライブラリ「pixivpy」を使用したダウンローダー
pythonのライブラリ「pixivpy」を使用したダウンローダー
print(next_url)
print(aapi.parse_qs(next_url))
https://app-api.pixiv.net/v1/user/illusts?user_id=24322989&filter=for_ios&type=illust&offset=30
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '30'}
であり、続けていくと
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '30'}
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '60'}
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '90'}
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '120'}
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '150'}
{'user_id': '24322989', 'filter': 'for_ios', 'type': 'illust', 'offset': '180'}
None
なのでaapiを使わずともとってこれる。
以下のようなメッセージが出て以後ログインしなおすまで同じエラーが出続ける
{'user_message': '', 'message': 'Error occurred at the OAuth process. Please check your Access Token to fix this. Error Message: invalid_grant', 'reason': '', 'user_message_details': {}}
frames = glob.glob(f'{dir_name}/*.jpg')
frames.sort()
のsort()は0埋めされていないと
0
1
10
11
12
という順番になるので生成されたうごイラがおかしくなっている。
原因はnext_qs
にtype=None
がないため
frames = glob.glob(f'{dir_name}/*.jpg')
となっているため、pngをとってこれない
うごイラのフォルダの有無で現在ダウンロード済みか否かを判定しているが、
フォルダ以下の最後のページが存在するかでやったほうが良い。
また、すべてダウンロードしていなくてもmp4,gifは作れるが、htmlは作れない。
また、htmlの名前もわかりにくい
[mpeg4 @ 000001eb3d342700] timebase 1000/66667 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
[ERROR:[email protected]] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2822) open Could not open codec mpeg4, error: Unspecified error
[ERROR:[email protected]] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2839) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
video = cv2.VideoWriter(f'{saving_direcory_path}/{illust_id}.mp4',fourcc, fps, (width, height))
今回fps = 1000/15
つまり66.66666666666667
として渡している。
この時、fpsからdelayを1/66.667=1000/66667
として計算しているみたいだ。
よって、分母が16bitの65535を超えたためエラーとなっている。
タイトルの通り、aapi.illust_detail()
でR18作品が表示されません
# 用户作品列表
## type: [illust, manga]
def user_illusts(self, user_id, type='illust', filter='for_ios', offset=None, req_auth=True):
となっていることから、manga作品がダウンロードされていない可能性がある。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.