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

Extracting multiple items from _VALID_URL #9544

Closed
TRox1972 opened this issue May 19, 2016 · 0 comments
Closed

Extracting multiple items from _VALID_URL #9544

TRox1972 opened this issue May 19, 2016 · 0 comments

Comments

@TRox1972
Copy link
Contributor

@TRox1972 TRox1972 commented May 19, 2016

Normally extractors get the video_id of a url using

video_id = self._match_id(url)

where _VALID_URL = r'https?://(?:www\.)example\.com/v/(?P<id>\d.+)'.

But have would one go about extracting multiple items from the url, e.g. if

But if one have multiple groups inside the _VALID_URL, e.g.

_VALID_URL = r'https?://(?:www\.)example\.com/v/(?P<id>\d.+)/(?P<second_id>[^/?]+)'

how would it be possible to get the second_id from _VALID_URL inside e.g. _real_extract? As far as I can see, there isn't any functions to match regex on _VALID_URL except _match_id.

@TRox1972 TRox1972 closed this May 19, 2016
@TRox1972 TRox1972 reopened this May 19, 2016
@TRox1972 TRox1972 closed this May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.