Comments (5)
コメントとPRありがとうございます。
ずっと前から忙しく放置してました...
了解です。時間があれば詳しく見てみたいと思います。
そしてまだまだPythonが未熟なころに作ったものなのでいつかコードを書き直したいと思います。
151~162の箇所はニコニコ動画の通信の仕様上必要な箇所です。
ニコニコ動画から動画を取得する際は定期的にhttps://api.dmc.nico/api/sessions/{session_id}?_format=json&_method=PUT
に動画データを送らなければ通信が切れてしまいます。
これをしている箇所です。
(niconico_dlを作ろうと思った時の仕様で今の仕様もこの仕様かは不明です。)
from niconico-dl.
分かりにくいissueで申し訳ないです!
おっしゃる通り151~162行目の部分は必要な部分だと思いますが、それ以外の部分の意味が分からなかったため質問させていただいたきました。
自分の音楽botも151~162行目の処理だけで動いているので、特に仕様の変更はないと思います!
from niconico-dl.
async版のheartbeatに関してですが、まだ私自身も試したわけではないのでうまくいく確証はありませんが、asyncio.gather
をうまく使えば、heartbeatを動かしながらプログラム内でのダウンロードができると思います(現状のコードは、heartbeatを動かしてクライアントが生きていることを示し続ける代わりに手動ダウンロードする形になっているという認識ですがあってますかね...?)。
from niconico-dl.
async版のheartbeatに関してですが、まだ私自身も試したわけではないのでうまくいく確証はありませんが、
asyncio.gather
をうまく使えば、heartbeatを動かしながらプログラム内でのダウンロードができると思います(現状のコードは、heartbeatを動かしてクライアントが生きていることを示し続ける代わりに手動ダウンロードする形になっているという認識ですがあってますかね...?)。
@y-chan
すみません返信するの忘れてました。
そしてまたすみません書き直す前の状態がどんなのか忘れたのですぐには返信できません。
書き直し後はheartbeat
をloop.create_task
で動かしています。
@akomekagome
コードを書き直して動くことを確認したので恐らく動くと思います。
from niconico-dl.
今日リリースしたバージョンでうまく動くのを確認したのでcloseします。
from niconico-dl.
Related Issues (3)
- 提案: Type Hintsの追加 HOT 7
- 提案:mylist取得機能の追加 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from niconico-dl.