AdvMaple / bilibili-subtitle-download-plugin

personal script to download subtitle from bilibili.tv (previously biliintl.com )
89 stars 24 forks source link

Request #42

Closed ghost closed 9 months ago

ghost commented 9 months ago

Hello, I wanted to download the video with high quality (1080p) using premium account I have. but I don't know which headers to post into api url. the headers I got is Date: Mon, 25 Dec 2023 12:55:02 GMT Content-Type: text/plain Content-Length: 18 Connection: keep-alive Bili-Trace-Id: 4b231de2af65897b X-Bili-Trace-Id: 0216ef8482f446c84b231de2af65897b please help me, I really don't know how to do it.

AdvMaple commented 9 months ago

Please provide the step you are trying to do. I haven't got any idea.

  1. Link to the video you are trying to download
  2. API endpoint you trying to use
  3. Your expected result
ghost commented 9 months ago

Please provide the step you are trying to do. I haven't got any idea.

  1. Link to the video you are trying to download
  2. API endpoint you trying to use
  3. Your expected result

Pardon me if I'm being bother you. The link I used is https://www.bilibili.tv/en/play/2089246/12953102?bstar_from=bstar-web.pgc-video-detail.episode.all and the api key(it's from your script as I don't know other api(s)) is https://api.bilibili.tv/intl/gateway/web/playurl?ep_id=12953102&platform=web&device=wap&qn=64&tf=0&type=0. The respond data contain just 360p. I wanted to get 1080p or highter quality but I don't know how to do it.I have premium account.

Thanks for your patience. With respect:

AdvMaple commented 9 months ago

No, I wasn't bother at all, and yes, feel free to raise any issue. Did you use the script normally? Or did you copy the API link and use it in Postman or some other tool?

calavikevin commented 9 months ago

From the previous version I have tested with a premium account, everything works fine.

Please note that a premium account login is required on the browser using this plugin. You will not be able to download premium resolution videos without a premium account token.

When you do not have a premium account and choose premium resolution, by default you can only download video with the highest available resolution.

calavikevin commented 9 months ago

Please provide the step you are trying to do. I haven't got any idea.

  1. Link to the video you are trying to download
  2. API endpoint you trying to use
  3. Your expected result

Pardon me if I'm being bother you. The link I used is https://www.bilibili.tv/en/play/2089246/12953102?bstar_from=bstar-web.pgc-video-detail.episode.all and the api key(it's from your script as I don't know other api(s)) is https://api.bilibili.tv/intl/gateway/web/playurl?ep_id=12953102&platform=web&device=wap&qn=64&tf=0&type=0. The respond data contain just 360p. I wanted to get 1080p or highter quality but I don't know how to do it.I have premium account.

Thanks for your patience. With respect:

If you're not logged in, the highest resolution you can download is 480p.

ghost commented 9 months ago

script

Thanks for your reply. I used your script api to make a telegram bot that upload the subtitles, and yet, I wanted to try it to upload the video download link together with the subtitle file.So that, I tried using the normal api (without any headers and params) and it got only 360p and can't accessible to premium contents.I don't know how to solve it and which headers to post.Could you help me? ') PS: Tbh, I'm not really familiar with coding, I used AI(GPT 3.5 opanai) to write code(python).

ghost commented 9 months ago

From the previous version I have tested with a premium account, everything works fine.

Please note that a premium account login is required on the browser using this plugin. You will not be able to download premium resolution videos without a premium account token.

When you do not have a premium account and choose premium resolution, by default you can only download video with the highest available resolution.

Well, my issue is not that, the code is working perfectly. I wanted to create another script using the api. Anyway, thanks for your recommand.

calavikevin commented 9 months ago

script

Thanks for your reply. I used your script api to make a telegram bot that upload the subtitles, and yet, I wanted to try it to upload the video download link together with the subtitle file.So that, I tried using the normal api (without any headers and params) and it got only 360p and can't accessible to premium contents.I don't know how to solve it and which headers to post.Could you help me? ') PS: Tbh, I'm not really familiar with coding, I used AI(GPT 3.5 opanai) to write code(python).

If you need a suggestion, my suggestion is yt-dlp. This is one of the CLIs that most fully supports downloading videos and subtitles from bilibli, including many options from simple to complex. I highly recommend this CLI, and of course it is written entirely in python. Hope it can help you provide some useful suggestions.

calavikevin commented 9 months ago

I'm really busy so I can't provide too much information about how this plugin is implemented. And technical support is not in my mind either. So I can only offer some useful suggestions for you. Happy coding :)

AdvMaple commented 9 months ago

Same idea with @calavikevin This script is originally written because ytb-dl doesn't support bilibli. If you need more technical support then I can only point you to read source code from ytb-dl and my script, that's as much as I can help. The original idea for the implementation is also from a thread from ytb-dl. You can also search in there.

AdvMaple commented 9 months ago

Closing this issue, because not really related to the script