wlerin / showroom

Script for archiving AKB48 Group related Showroom streams
MIT License
59 stars 20 forks source link

403 Client Error #29

Closed LidoCKT closed 6 months ago

LidoCKT commented 3 years ago

I tried to use but got error:

Current Time is 22:55 Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102 Retrying in 0.5 seconds... Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102 Retrying in 1.0 seconds... Getting https://www.showroom-live.com/api/live/upcoming?genre_id=102 failed: 403 Client Error: Forbidden for url: https://www.showroom-live.com/api/live/upcoming?genre_id=102

What is the reason?

skeith commented 3 years ago

Is it happening for all stream? Can you try using a different IP address?

LidoCKT commented 3 years ago

I tried. My pc in China and Server in France. The same. QQ截图20201123102137

skeith commented 3 years ago

are you watching or having a specific list?

let me try with my server

================ UPDATE It works on my server. My conclusion is your IP(s) are probably being blocked. This is not a definitive answer since I am not really sure. In the past, the error when you are being blocked is different.

LidoCKT commented 3 years ago

emmm. But I can open the site(https://www.showroom-live.com/api/live/upcoming?genre_id=102) in my browser. QQ截图20201123180904 The same IP......I can't use this py script. Can only Japanese IP use this script?

are you watching or having a specific list?

Just default...Follow the README, setup and do ‘python showroom.py --all’

skeith commented 3 years ago

paging @wlerin

anyway, which branch did you clone?

wlerin commented 3 years ago

Japanese IP is not required. I'm not sure what might be causing this. What version of Python, Requests, etc. are you using?

skeith commented 3 years ago

Japanese IP is not required. I'm not sure what might be causing this.

I am guessing, he/she is using default branch, not development could that be the issue here?

wlerin commented 3 years ago

Every branch but master (default) and hls-python is defunct, including development.

skeith commented 3 years ago

Every branch but master (default) and hls-python is defunct, including development.

ah right, I mistakenly referring to an old issue

wlerin commented 3 years ago

But I can open the site(https://www.showroom-live.com/api/live/upcoming?genre_id=102) in my browser.

Are you logged in in the browser?

After a brief bit of testing I was able to trigger a 403 error with a bad user-agent. I don't see a way for this to affect showroom.py, however. @lidoworld Have you made any modifications to the code?

LidoCKT commented 3 years ago

@wlerin Yes, I logged in. I did not make any changes to the code...Just downloaded the .zip from latest release.

wlerin commented 3 years ago

latest release.

Well there's your problem. The "latest release" is from 2017. It definitely doesn't work anymore. Download the zip from the main page instead of the releases page, or clone the repository using git.

(I've added a new release to avoid this problem in the future, but I've half a mind to just delete all of them, they don't get updated often enough.)

LidoCKT commented 3 years ago

QQ截图20201125160722 QQ截图20201125155744

New release 0.5.0 seems OK on my PC. But using git clone on my server, it still failed.

If I only want the showroom of a certain group, can I delete the .jdex files of other groups in the index folder?

wlerin commented 3 years ago

But using git clone on my server, it still failed.

It's possible the server itself is blocked. Does the following command work there:

wget --user-agent= 'https://www.showroom-live.com/api/live/upcoming?genre_id=102' -O upcoming.json

Alternatively, what is the output of git status on the server? I suppose that is being cloned into an empty folder, so it should be on the correct branch (master).

If I only want the showroom of a certain group, can I delete the .jdex files of other groups in the index folder?

Yes. Though it would be better to create a separate index folder with only the files you want (or custom files) and point the script at that.

LidoCKT commented 3 years ago

wget --user-agent= 'https://www.showroom-live.com/api/live/upcoming?genre_id=102' -O upcoming.json --2020-11-26 00:52:39-- https://www.showroom-live.com/api/live/upcoming?genre_id=102 Resolving www.showroom-live.com (www.showroom-live.com)... 52.196.53.208, 52.193.17.13, 13.113.206.203 Connecting to www.showroom-live.com (www.showroom-live.com)|52.196.53.208|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2020-11-26 00:52:40 ERROR 403: Forbidden.

IP blocked. I gave up~ Thanks for your reply, wlerin and skeith.

sakamichi kenshusei members can also join to the index. Nogi new 4th, Sakura new 2nd and Hina new 3rd. What's the "priority" in .jdex file?

wlerin commented 3 years ago

There used to be a limit on how many rooms could record at once, priority was used to decide which ones to skip when there were too many already. Later I realised that recording more rooms didn't require all that much extra processing power, so removed that limit. Priority doesn't do anything important anymore. Eventually I want to rework the index files so that you can just ignore some fields (and thus leave them with the default).

I'm pretty sure Nogi 4th is already in the index, not sure about the other two groups (also I should rename Keyakizaka to Sakurazaka...). If Nogi 4th isn't in the index already, that's probably because I'm using (and updating) a different index instead of the one in this repo.

LidoCKT commented 3 years ago

Nogi 4th first members (joined on 18.12.03) is included, but second members (joined on 20.03.25) is not. New 2nd members of Sakura and new 3rd members of Hina (joined on 20.03.25) are the same. I added it myself, so I have the question about "priority".

wlerin commented 6 months ago

I believe this issue was resolved years ago, so I'm going to close it now.