Skip to content
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

Chelsea FC #31412

Open
5 tasks done
yossibiton opened this issue Dec 11, 2022 · 3 comments · May be fixed by #31918
Open
5 tasks done

Chelsea FC #31412

yossibiton opened this issue Dec 11, 2022 · 3 comments · May be fixed by #31918
Labels
Good first issue An issue that should be easier to solve site-support-request Add extractor(s) for a new domain

Comments

@yossibiton
Copy link

yossibiton commented Dec 11, 2022

Checklist

  • I'm reporting a new site support request
  • I've verified that I'm running youtube-dl version 2021.12.17
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that none of provided URLs violate any copyrights
  • I've searched the bugtracker for similar site support requests including closed ones

Example URLs

Description

Videos of Chelsea FC

@yossibiton yossibiton added the site-support-request Add extractor(s) for a new domain label Dec 11, 2022
@dirkf
Copy link
Contributor

dirkf commented Dec 11, 2022

Obvs more chance of getting qpr.co.uk implemented, but this might be quite straightforward for someone who cares.

  1. In the web page find the <div> element with data-component="VideoDetails".
  2. Extract the value of its data-props attribute.
  3. Decode the HTML-encoded (eg &quot;) string.
  4. Parse the resulting string as JSON.
  5. Extract the videoDetail.signedUrl member of the JSON (a time-limited JWPlayer manifest) into a url_transparent result.
  6. Add the other metadata from the videoDetail member.
  7. Return the result.
video-details JSON

{
  'videoDetail': {
    'autoPlay': true,
    'sharePlatforms': [
      {
        'key': 0,
        'id': 'facebook',
        'name': 'Facebook',
        'mobileOnly': false
      },
      {
        'key': 1,
        'id': 'twitter',
        'name': 'Twitter',
        'mobileOnly': false
      },
      {
        'key': 2,
        'id': 'copy-link',
        'name': 'copyLink',
        'mobileOnly': false
      }
    ],
    'title': 'FIRST HALF: Manchester United v Chelsea (A)',
    'description': 'Watch the full first-half of our Premier League match v Manchester United at Old Trafford.',
    'provider': 'jwplayer',
    'releaseDate': '2019-08-11T22:00:00.0000000+00:00',
    'duration': '51:13',
    'image': {
      'id': 'editorial/news/2019/8/pulisic-united-DAZ_5152-527270_2019081160815175_copy',
      'title': 'FIRST HALF: Manchester United v Chelsea (A)',
      'description': '',
      'file': {
        'fileName': 'editorial/news/2019/8/pulisic-united-DAZ_5152-527270_2019081160815175_copy',
        'contentType': 'image',
        'type': 'upload',
        'format': 'jpg',
        'url': 'http://img.chelseafc.com/image/upload/v1565547070/editorial/news/2019/8/pulisic-united-DAZ_5152-527270_2019081160815175_copy.jpg',
        'urlObject': {
          'baseUrl': 'https://res.cloudinary.com/',
          'cloudName': 'chelsea-production',
          'resourceType': 'image',
          'type': 'upload',
          'publicId': 'editorial/news/2019/8/pulisic-united-DAZ_5152-527270_2019081160815175_copy'
        },
        'details': {
          'size': 1149397,
          'transformations': '',
          'image': {
            'width': 3772,
            'height': 2514
          }
        }
      },
      'coordinates': [
      ]
    },
    'category': {
      'id': 'fe3e08c7-4c3a-41b5-a271-76bb48f02454',
      'title': 'Men\'s Team',
      'url': '/en/news/category/mens-team',
      'isExternal': false,
      'isActive': false
    },
    'tags': [
      {
        'id': '66696593-ff1d-4099-a2d2-7457cfd21d99',
        'title': 'Manchester United',
        'url': '/en/news/tag/manchester-united',
        'isExternal': false,
        'isActive': false
      },
      {
        'id': '9243d121-0cb3-46de-8790-16a98fe9f3ca',
        'title': 'Men',
        'url': '/en/news/tag/men',
        'isExternal': false,
        'isActive': false
      }
    ],
    'signedUrl': 'https://cdn.jwplayer.com/manifests/ot0ooPZ4.m3u8?exp=1670760442&sig=e80b386bd44059c8e4710490471d0a81',
    'inline': false,
    'playerScriptUrl': 'https://cdn.jwplayer.com/libraries/NHgCkCEX.js?exp=1670760442&sig=97c6fbcad37db8df274efdf5aefd1df0',
    'type': 'video'
  },
  'links': [
  ],
  'upNext': {
    'items': [
      {
        'id': '2QfyzITXFZHXSCGcChR1k1',
        'title': 'Villa in view',
        'type': 'Video',
        'category': {
          'id': '4b17f0e6-ba4d-4093-8e70-25fe5c77ba22',
          'title': 'Video',
          'url': '/en/news/category/video',
          'isExternal': false,
          'isActive': false
        },
        'date': '2022-12-11T08:00:00.0000000+00:00',
        'url': '/en/video/villa-in-view',
        'thumbnail': {
          'id': 'video/2022/12/10/10122022_Standard_TRAINING_WIDE-Recovered',
          'title': 'video/2022/12/10/10122022_Standard_TRAINING_WIDE-Recovered',
          'description': '',
          'credit': '',
          'file': {
            'fileName': 'video/2022/12/10/10122022_Standard_TRAINING_WIDE-Recovered',
            'contentType': 'image',
            'type': 'upload',
            'format': 'jpg',
            'url': 'http://img.chelseafc.com/image/upload/v1670711952/video/2022/12/10/10122022_Standard_TRAINING_WIDE-Recovered.jpg',
            'urlObject': {
              'baseUrl': 'https://res.cloudinary.com/',
              'cloudName': 'chelsea-production',
              'resourceType': 'image',
              'type': 'upload',
              'publicId': 'video/2022/12/10/10122022_Standard_TRAINING_WIDE-Recovered'
            },
            'details': {
              'size': 555078,
              'transformations': '',
              'image': {
                'width': 1920,
                'height': 1080
              }
            }
          },
          'coordinates': [
          ]
        },
        'videoId': 'Vs9g9Dys',
        'isBoxSet': false
      },
      {
        'id': '3WUfLQ1tovsnn7LgN8NqTk',
        'title': 'Last days in Abu Dhabi',
        'type': 'Video',
        'category': {
          'id': '414e00cd-d144-4bb4-9210-d4bb19e28000',
          'title': 'Video',
          'url': '/en/news/category/video',
          'isExternal': false,
          'isActive': false
        },
        'date': '2022-12-10T21:00:00.0000000+00:00',
        'url': '/en/video/last-days-in-abu-dhabi',
        'thumbnail': {
          'id': 'video/2022/12/10/09122022_v2_Standard_TRAINING_WIDE-Recovered',
          'title': 'video/2022/12/10/09122022_v2_Standard_TRAINING_WIDE-Recovered',
          'description': '',
          'credit': '',
          'file': {
            'fileName': 'video/2022/12/10/09122022_v2_Standard_TRAINING_WIDE-Recovered',
            'contentType': 'image',
            'type': 'upload',
            'format': 'jpg',
            'url': 'http://img.chelseafc.com/image/upload/v1670709445/video/2022/12/10/09122022_v2_Standard_TRAINING_WIDE-Recovered.jpg',
            'urlObject': {
              'baseUrl': 'https://res.cloudinary.com/',
              'cloudName': 'chelsea-production',
              'resourceType': 'image',
              'type': 'upload',
              'publicId': 'video/2022/12/10/09122022_v2_Standard_TRAINING_WIDE-Recovered'
            },
            'details': {
              'size': 506550,
              'transformations': '',
              'image': {
                'width': 1920,
                'height': 1080
              }
            }
          },
          'coordinates': [
          ]
        },
        'videoId': 'P5ZrLueQ',
        'isBoxSet': false
      },
      {
        'id': 'YOUdDPjYpTYJZM3Curn7A',
        'title': 'Time to hear from Reece! 🎤',
        'type': 'Video',
        'category': {
          'id': '6ffb962e-da60-416d-aa0b-bfe44d1d0ad7',
          'title': 'Video',
          'url': '/en/news/category/video',
          'isExternal': false,
          'isActive': false
        },
        'date': '2022-12-10T11:30:00.0000000+00:00',
        'url': '/en/video/reece-james-wt-16x9',
        'thumbnail': {
          'id': 'video/2022/12/09/Reece_James_Walk_and_Talk_Standard_TRAINING_WIDE-Recovered',
          'title': 'video/2022/12/09/Reece_James_Walk_and_Talk_Standard_TRAINING_WIDE-Recovered',
          'description': '',
          'credit': '',
          'file': {
            'fileName': 'video/2022/12/09/Reece_James_Walk_and_Talk_Standard_TRAINING_WIDE-Recovered',
            'contentType': 'image',
            'type': 'upload',
            'format': 'jpg',
            'url': 'http://img.chelseafc.com/image/upload/v1670629917/video/2022/12/09/Reece_James_Walk_and_Talk_Standard_TRAINING_WIDE-Recovered.jpg',
            'urlObject': {
              'baseUrl': 'https://res.cloudinary.com/',
              'cloudName': 'chelsea-production',
              'resourceType': 'image',
              'type': 'upload',
              'publicId': 'video/2022/12/09/Reece_James_Walk_and_Talk_Standard_TRAINING_WIDE-Recovered'
            },
            'details': {
              'size': 318400,
              'transformations': '',
              'image': {
                'width': 1920,
                'height': 1080
              }
            }
          },
          'coordinates': [
          ]
        },
        'videoId': 'BZwH0k9k',
        'isBoxSet': false
      }
    ],
    'title': 'Up next...',
    'isBoxSet': false
  },
  'isBoxset': false,
  'googleAd': {
    'id': 'web_sitewide_banner',
    'minWidth': 300,
    'minHeight': 90
  }
}

@dirkf dirkf added the Good first issue An issue that should be easier to solve label Dec 11, 2022
@andyjphu
Copy link

andyjphu commented Mar 6, 2023

Novice Here: But I tried following @dirkf's instructions and I can't do the first step or try going around it, either because the site changed or because I don't know enough--and if that's the case, are there any resources that are good to learn how to do this?

@dirkf
Copy link
Contributor

dirkf commented Mar 6, 2023

The listed steps are straightforward for implementation in an extractor.

To do the same things manually, you'd need to be skilled in the use of your browser's development tools and JavaScript. There's a whole WWW to help you.

@dirkf dirkf linked a pull request Apr 10, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue An issue that should be easier to solve site-support-request Add extractor(s) for a new domain
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants