GithubHelp home page GithubHelp logo

pixiv_downloader's People

Contributors

yuki-2000 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

pixiv_downloader's Issues

ページをとってくるときにaapiを使う回数を減らせる

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を使わずともとってこれる。

ある程度使っていると invalid_grantのエラーが出る

以下のようなメッセージが出て以後ログインしなおすまで同じエラーが出続ける

{'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

という順番になるので生成されたうごイラがおかしくなっている。

うごイラのダウンロード済みかの判断が甘い

うごイラのフォルダの有無で現在ダウンロード済みか否かを判定しているが、
フォルダ以下の最後のページが存在するかでやったほうが良い。

また、すべてダウンロードしていなくてもmp4,gifは作れるが、htmlは作れない。

また、htmlの名前もわかりにくい

error: [mpeg4 @ 000001eb3d342700] timebase 1000/66667 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535

[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を超えたためエラーとなっている。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.