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

Detecting embedded youtube videos on WorldStar HipHop #921

Closed
JMSwag opened this issue Jun 24, 2013 · 2 comments
Closed

Detecting embedded youtube videos on WorldStar HipHop #921

JMSwag opened this issue Jun 24, 2013 · 2 comments

Comments

@JMSwag
Copy link

@JMSwag JMSwag commented Jun 24, 2013

Hey, wshh often times embeds youtube urls like this video

http://www.worldstarhiphop.com/videos/video.php?v=wshh9i6f61393imvzOo9
so.addVariable("file","http://www.youtube.com/v/z3r27ukMoMg")

the wshh ie can grab the embedded youtube url already. Since the FileDownloader sets the wshhIE as the one to use for extractions, how would one go by using the YoutubeIE after a youtube url has been detected in the webpage source?

Regular wshh video url for reference
http://www.worldstarhiphop.com/videos/video.php?v=wshh2h299RVL1FCan6dC
so.addVariable("file","http://hw-videos.worldstarhiphop.com/u/vid/2012/06/18/sgswsffwretdfgetwfxetfd3tedfrdf35edf43f3f6htrg5gtrf45t43drdedew.mp4 ")

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 24, 2013

Inside the WorldStar IE in _real_extract you can return (intead of the standard dict) a info_dict with the format:

{"_type":"url",
 "url":"{the_youtube_url}"
}

You can use the helper method url_result, see https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/mtv.py for an example.

Once you return the url, the YoutubeDL class (the old FileDownloader) will take care of extracting the new url.

@JMSwag
Copy link
Author

@JMSwag JMSwag commented Jun 25, 2013

pull request submitted: #922

@jaimeMF jaimeMF closed this Jun 25, 2013
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
2 participants
You can’t perform that action at this time.