Skip to content

Commit

Permalink
Remove duration from channels?part=shorts due to YouTube UI change
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Loison committed Feb 23, 2024
1 parent 6dcedbb commit 79dbd1a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions channels.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ function getItem($id, $order, $continuationToken)
$reelItemRenderer = $reelShelfRendererItem['richItemRenderer']['content']['reelItemRenderer'];
$viewCount = getIntValue($reelItemRenderer['viewCountText']['simpleText'], 'view');
$frame0Thumbnails = $reelItemRenderer['navigationEndpoint']['reelWatchEndpoint']['thumbnail']['thumbnails'];
$durationParts = explode(' - ', $reelItemRenderer['accessibility']['accessibilityData']['label']);
end($durationParts);
// Can be `n seconds` or `1 minute` it seems.
$duration = prev($durationParts);

$short = [
'videoId' => $reelItemRenderer['videoId'],
Expand All @@ -223,7 +219,6 @@ function getItem($id, $order, $continuationToken)
'thumbnails' => $reelItemRenderer['thumbnail']['thumbnails'],
'viewCount' => $viewCount,
'frame0Thumbnails' => $frame0Thumbnails,
'duration' => $duration
];
if (!$continuationTokenProvided) {
$browseEndpoint = $tabRenderer['endpoint']['browseEndpoint'];
Expand Down

0 comments on commit 79dbd1a

Please sign in to comment.