Skip to content

plugins.huya: update liveId to type str #4763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

ohaiibuzzle
Copy link
Contributor

@ohaiibuzzle ohaiibuzzle commented Aug 22, 2022

Fixes the Huya plugin, closes #4762

It appears that Huya have updated its JSON respose and changed liveId from int to str, which causes Streamlink to throw ValidationError

An example of such JSON response

var TT_ROOM_DATA = {
    "type": "NORMAL",
    "state": "ON",
    "isOn": true,
    "isOff": false,
    "isReplay": false,
    "isPayRoom": 0,
    "isSecret": 0,
    "roomPayPassword": "",
    "id": "2246718540",
    "sid": "2246718540",
    "channel": "2246718540",
    "liveChannel": "2246718540",
    "liveId": "7134653690594404016",
    "shortChannel": 0,
    "isBluRay": 1,
    "gameFullName": "QQ飞车",
    "gameHostName": "qqfc",
    "screenType": 1,
    "startTime": 1661166012,
    "totalCount": 94949,
    "cameraOpen": 0,
    "liveCompatibleFlag": 0,
    "bussType": 1,
    "isPlatinum": 1,
    "isAutoBitrate": 0,
    "screenshot": "https://anchorpost.msstatic.com/cdnimage/anchorpost/1048/bf/cabe0c27190175f71f3ba6625d6339_0_1612088308.jpg",
    "previewUrl": "",
    "gameId": 0,
    "liveSourceType": 0,
    "privateHost": "2248015237",
    "profileRoom": 602781,
    "recommendStatus": 0,
    "popular": 0,
    "gid": 9,
    "introduction": "排位3000分段 晚点刷记录走起!",
    "isRedirectHuya": 0,
    "isShowMmsProgramList": 0
};

@bastimeyer bastimeyer added plugin issue A Plugin does not work correctly PR: needs commit message fix labels Aug 22, 2022
@bastimeyer bastimeyer changed the title stream/plugins.huya: Update liveId to type str plugins.huya: update liveId to type str Aug 22, 2022
@bastimeyer bastimeyer merged commit 38b5c76 into streamlink:master Aug 22, 2022
@bastimeyer
Copy link
Member

Thanks

@ohaiibuzzle ohaiibuzzle deleted the fix/huya branch August 22, 2022 14:16
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Aug 29, 2022
light4 pushed a commit to light4/streamlink that referenced this pull request Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin issue A Plugin does not work correctly PR: needs commit message fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.huya: As of today, Huya plugin has been broken
2 participants