GithubHelp home page GithubHelp logo

Comments (5)

tasuren avatar tasuren commented on July 18, 2024

コメントとPRありがとうございます。
ずっと前から忙しく放置してました...
了解です。時間があれば詳しく見てみたいと思います。
そしてまだまだPythonが未熟なころに作ったものなのでいつかコードを書き直したいと思います。

151~162の箇所はニコニコ動画の通信の仕様上必要な箇所です。
ニコニコ動画から動画を取得する際は定期的にhttps://api.dmc.nico/api/sessions/{session_id}?_format=json&_method=PUTに動画データを送らなければ通信が切れてしまいます。
これをしている箇所です。
(niconico_dlを作ろうと思った時の仕様で今の仕様もこの仕様かは不明です。)

from niconico-dl.

akomekagome avatar akomekagome commented on July 18, 2024

分かりにくいissueで申し訳ないです!
おっしゃる通り151~162行目の部分は必要な部分だと思いますが、それ以外の部分の意味が分からなかったため質問させていただいたきました。

自分の音楽botも151~162行目の処理だけで動いているので、特に仕様の変更はないと思います!

from niconico-dl.

y-chan avatar y-chan commented on July 18, 2024

async版のheartbeatに関してですが、まだ私自身も試したわけではないのでうまくいく確証はありませんが、asyncio.gatherをうまく使えば、heartbeatを動かしながらプログラム内でのダウンロードができると思います(現状のコードは、heartbeatを動かしてクライアントが生きていることを示し続ける代わりに手動ダウンロードする形になっているという認識ですがあってますかね...?)。

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024

async版のheartbeatに関してですが、まだ私自身も試したわけではないのでうまくいく確証はありませんが、asyncio.gatherをうまく使えば、heartbeatを動かしながらプログラム内でのダウンロードができると思います(現状のコードは、heartbeatを動かしてクライアントが生きていることを示し続ける代わりに手動ダウンロードする形になっているという認識ですがあってますかね...?)。

@y-chan
すみません返信するの忘れてました。
そしてまたすみません書き直す前の状態がどんなのか忘れたのですぐには返信できません。
書き直し後はheartbeatloop.create_taskで動かしています。

@akomekagome
コードを書き直して動くことを確認したので恐らく動くと思います。

from niconico-dl.

tasuren avatar tasuren commented on July 18, 2024

今日リリースしたバージョンでうまく動くのを確認したのでcloseします。

from niconico-dl.

Related Issues (3)

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.