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

[appleconnect] fix extractor #29208

Merged
merged 1 commit into from Jun 16, 2021
Merged

[appleconnect] fix extractor #29208

merged 1 commit into from Jun 16, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jun 4, 2021

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

  1. I happened to find that appleconnect extractor fails. I get:
$ youtube-dl https://itunes.apple.com/us/post/idsa.4ab17a39-2720-11e5-96c5-a5b38f6c42d3 --ignore-config -v -F
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://itunes.apple.com/us/post/idsa.4ab17a39-2720-11e5-96c5-a5b38f6c42d3', u'--ignore-config', u'-v', u'-F']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.05.16
[debug] Python version 2.7.10 (CPython) - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.4, ffprobe 4.4, phantomjs 2.1.1
[debug] Proxy map: {}
[AppleConnect] 4ab17a39-2720-11e5-96c5-a5b38f6c42d3: Downloading webpage
ERROR: Unable to extract like count; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

The like count, or 'n Loves', doesn't exist in the webpage now. Since it is an optional field, and there may be some possibility that it comes back again, I changed the default value None to be returned.

  1. While doing above, I found another type of url https://itunes.apple.com/us/post/sa.0fe0229f-2457-11e5-9f40-1bb645f2d5d9. This url can be handled by the generic extractor now, I thought it better to be handled by appleconnect extractor so I changed _VALID_URL to accept it.

@dstftw dstftw merged commit 8fe5d54 into ytdl-org:master Jun 16, 2021
@ghost ghost deleted the fix-appleconnect branch June 16, 2021 23:22
gaming-hacker added a commit to gaming-hacker/youtube-dl that referenced this pull request Sep 3, 2021
* commit '188b7b108e1cd287580bee5dba8075e669c29a10': (192 commits)
  Avoid skipping ID when unlisted_hash is numeric
  [peertube] only call description endpoint if necessary (ytdl-org#29383)
  [periscope] pass referer to HLS requests(closes ytdl-org#29419)
  [liveleak] Remove extractor (closes ytdl-org#17625, closes ytdl-org#24222) (ytdl-org#29331)
  [pornhub] Add support for pornhubthbh7ap3u.onion
  [pornhub] Detect geo restriction
  [pornhub] Dismiss tbr extracted from download URLs (closes ytdl-org#28927)
  [curiositystream:collection] Extend _VALID_URL (closes ytdl-org#26326, closes ytdl-org#29117)
  [youtube] Make get_video_info processing more robust (closes ytdl-org#29333)
  [youtube] Workaround for get_video_info request (refs ytdl-org#29333)
  [bilibili] Strip uploader name (ytdl-org#29202)
  [youtube] Update invidious instance list (ytdl-org#29281)
  [umg:de] Update GraphQL API URL (ytdl-org#29304)
  [nrk] Switch psapi URL to https (closes ytdl-org#29344)
  [postprocessor/ffmpeg] Show ffmpeg output on error (refs ytdl-org#22680) (ytdl-org#29336)
  [egghead] Add support for app.egghead.io (closes ytdl-org#28404) (ytdl-org#29303)
  [appleconnect] Fix extraction (ytdl-org#29208)
  [orf:tvthek] Add support for MPD formats (closes ytdl-org#28672) (ytdl-org#29236)
  [README.md] Update MSVC 2010 redist URL (closes ytdl-org#29222)
  release 2021.06.06
  ...

# Conflicts:
#	youtube_dl/extractor/generic.py
@Lesmiscore Lesmiscore mentioned this pull request Feb 20, 2022
14 tasks
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.

2 participants