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

[PlaysTVIE] Fix for plays.tv extractor, adding additional tests #11165

Closed
wants to merge 2 commits into from
Closed

[PlaysTVIE] Fix for plays.tv extractor, adding additional tests #11165

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 11, 2016

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

  • Plays.tv format changed, previous extractor throws errors (R.bindContent* from the original IE no longer exists anywhere on the page)

  • Added additional tests, including one for non-English characters

'content'), video_id)['content']
content = self._search_regex(
r'<script class=\"linked_data\" type=\"application\/ld\+json\">{(.+?)}<\/script>', webpage, 'content')
content = self._parse_json("{" + content + "}", video_id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

_search_json_ld may be useful here

'info_dict': {
'id': '58236095d388d140aa',
'ext': 'mp4',
'title': 'akn3ex - \u63a7\u3048\u3081\u306b\u8a00\u3063\u3066\u9811\u5f35\u3063\u3066\u308b',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just put original texts: 控えめに言って頑張ってる

'title': 'SavageIs - pro abortion propaganda',
'description': 'Posted by SavageIs',
}
}]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are those test cases different in terms of how videos are extracted? If so please add some comments in each test case. Otherwise just leave one test case.

Copy link
Author

Choose a reason for hiding this comment

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

I removed the tests since it's the same extraction. My original thought was to have separate test cases for:

  • http vs https
  • non-ascii characters
  • Verified account vs standard user account (for example, some sites might in the future force ads or additional DRM/prevent downloads of only verified accounts or high profile accounts or partners)

But the extraction method is same, so removed.

@dstftw
Copy link
Collaborator

dstftw commented Nov 12, 2016

Cherry-picked, thanks.

@dstftw dstftw closed this Nov 12, 2016
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.

None yet

3 participants