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

[YouTube] Update clients version and improve extraction of API key and client version of WEB client #890

Commits on Aug 12, 2022

  1. [YouTube] Improve WEB client version and API key HTML extraction

    Common code in WEB client version HTML extraction has been deduplicated, usage of the Java 8 Stream API has been made and initial data fallback has been used as a last resort.
    This means that the client version extraction from regexes will be used before this fallback, as it doesn't contain the full client version.
    This can be used as a way to fingerprint the extractor, even if it seems to be not the case.
    AudricV committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    d7e678a View commit details
    Browse the repository at this point in the history
  2. [YouTube] Update client versions and use a real version for the iOS c…

    …lient
    
    The iOS version can be got easily in fact, by looking at the What's New section of the App Store' app page.
    AudricV committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    d0549a5 View commit details
    Browse the repository at this point in the history
  3. [YouTube] Spoof more mobile clients

    Additional parameters have been added to the player requests of ANDROID and IOS
    clients:
    
    - for both clients: osName and osVersion: their respective values are:
      - for the ANDROID one: Android and 12;
      - for the IOS one: iOS and 15.6.0.19G71.
    - for the ANDROID client: androidTargetSdkVersion, with the Android SDK version
      corresponding to the Android version used in the player requests of this
      client. This parameter is now required with this client to be sure to get a
      correct player response, otherwise, the one of a video saying that this
      content is not available in this app and to watch it with the latest version
      of YouTube can be returned instead;
    - for the IOS client: deviceMake, with Apple as its value.
    
    The iOS version sent in the IOS client player requests has been also updated to
    the version 15.6 of the OS.
    
    Finally, a comment about the requirement to use the signature timestamp from
    the player JavaScript base file for HTML5 player requests on videos with
    obfuscated URLs has been added and replaces a previous one which may be not
    true.
    AudricV committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    c82317e View commit details
    Browse the repository at this point in the history
  4. [YouTube] Ensure that an additional player response is the correct one

    If YouTube detect that requests come from a third party client, they may
    replace the real player response by another one of a video saying that this
    content is not available on this app and to watch it on the latest version of
    YouTube. We can detect this by checking whether the video ID of the player
    response returned is the same as the one requested by the extractor.
    AudricV committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    7bdca33 View commit details
    Browse the repository at this point in the history
  5. [YouTube] Update mocks

    AudricV committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    472f5d9 View commit details
    Browse the repository at this point in the history