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

feat: add extractor for ebay video listings #6170

Merged
merged 4 commits into from
Feb 17, 2023

Conversation

JChris246
Copy link
Contributor

Description of your pull request and other information

This PR seeks to add an extractor for ebay video listings as described in issue #6134

Fixes #6134

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp 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?

yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
Copy link
Member

@pukkandan pukkandan left a comment

Choose a reason for hiding this comment

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

Does a product only ever have a single video? If so, isn't it better to use the webpage's title instead of video_json.title?

yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ebay.py Outdated Show resolved Hide resolved
@pukkandan pukkandan added site-request Request to support a new website pending-fixes PR has had changes requested labels Feb 8, 2023
@JChris246
Copy link
Contributor Author

JChris246 commented Feb 8, 2023

Does a product only ever have a single video? If so, isn't it better to use the webpage's title instead of video_json.title?

I wasn't able to find any where there was more than one video, so I suppose it's safe to assume that they all only have a single video. I made the change to use the html title instead 👍


return {
'id': video_id,
'title': self._html_extract_title(webpage),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'title': self._html_extract_title(webpage),
'title': remove_end(self._html_extract_title(webpage), ' | eBay'),

elif key == 'DASH':
formats.extend(self._extract_mpd_formats(url, video_id, fatal=False))
else:
self.report_warning('unsupported format found: %s' % key, video_id)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self.report_warning('unsupported format found: %s' % key, video_id)
self.report_warning(f'Unsupported format {key}', video_id)

@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Feb 9, 2023
@pukkandan pukkandan merged commit da88055 into yt-dlp:master Feb 17, 2023
@JChris246 JChris246 deleted the feat/ebay branch February 17, 2023 03:41
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-request Request to support a new website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for eBay listing videos
2 participants