Skip to content

Conversation

@HitomaruKonpaku
Copy link

@HitomaruKonpaku HitomaruKonpaku commented Sep 3, 2022

masterchat unable to to get & check playabilityStatus of members only stream so I temporary disable the check

Also adding metadata parser to get more detail of video

For example: https://www.youtube.com/watch?v=mwJGZ8YU7o4

{
  "url": "https://www.youtube.com/watch?v=mwJGZ8YU7o4",
  "name": "【#百鬼あやめ4周年記念 / 3DLIVE】Nakiriayame 4th anniversary ~Hapiness to you ♡~",
  "description": "========================🌸百鬼あやめ 活動4周年記念グッズ発売!🌸https://shop.hololivepro.com/products/nakiriayame_an4th■映像制作ディレクションSyamo.G-しゃもじ-  様 https://twitter.com/syamoj...",
  "paid": false,
  "channelId": "UC7fk0CB07ly8oSl0aqKkqFg",
  "videoId": "mwJGZ8YU7o4",
  "duration": "PT76M3S",
  "unlisted": false,
  "author": {
    "url": "http://www.youtube.com/channel/UC7fk0CB07ly8oSl0aqKkqFg",
    "name": "Nakiri Ayame Ch. 百鬼あやめ"
  },
  "thumbnailUrl": "https://i.ytimg.com/vi/mwJGZ8YU7o4/hqdefault.jpg",
  "thumbnail": {
    "url": "https://i.ytimg.com/vi/mwJGZ8YU7o4/hqdefault.jpg",
    "width": 480,
    "height": 360
  },
  "embedUrl": "https://www.youtube.com/embed/mwJGZ8YU7o4",
  "playerType": "HTML5 Flash",
  "width": 1280,
  "height": 720,
  "isFamilyFriendly": true,
  "regionsAllowed": "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW",
  "interactionCount": false,
  "datePublished": "2022-09-03",
  "uploadDate": "2022-09-03",
  "genre": "Entertainment",
  "publication": {
    "isLiveBroadcast": true,
    "startDate": "2022-09-03T10:56:08+00:00",
    "endDate": "2022-09-03T12:12:56+00:00"
  }
}

const channelId = videoOwner.navigationEndpoint.browseEndpoint.browseId;
const channelName = runsToString(videoOwner.title.runs);
const isLive = primaryInfo.viewCount!.videoViewCountRenderer.isLive ?? false;
const metadata = parseVideoMetadataFromHtml(html);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you parsed the metadata but I don't think you're exposing it anywhere at all?

Copy link
Author

@HitomaruKonpaku HitomaruKonpaku Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we just return simple data (title/channelId/channelName)

But I just think we can return full metadata in case anyone need 🤔

@HitomaruKonpaku
Copy link
Author

Also fix #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants