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

JWplayer JS loader (solution inside) #685

Closed
maximeg opened this issue Feb 14, 2013 · 3 comments
Closed

JWplayer JS loader (solution inside) #685

maximeg opened this issue Feb 14, 2013 · 3 comments
Assignees

Comments

@maximeg
Copy link

@maximeg maximeg commented Feb 14, 2013

For the JWplayer JS video loader :

playlist: [{
sources: [
{ file: "http://blabla.com/bla/bla.mp4", height: 360, width: 640 },
{ file: "http://blabla.com/bla/bla.flv", height: 240, width: 430 },
{ file: "http://blabla.com/bla/bla.webm", height: 360, width: 640 },
{ file: "http://blabla.com/bla/bla-hd.mp4", height: 720, width: 1280 }]}],

In InfoExtractors.py, near line 1365 :

        # Start with something easy: JW Player in SWFObject
        mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
        if mobj is None:
            # Broaden the search a little bit
            mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
        if mobj is None:
            # Broaden the search a little bit: JWPlayer JS loader
            mobj = re.search(r'[^A-Za-z0-9]?file:\s*["\'](http[^\'"&]*)', webpage)
        if mobj is None:
            self._downloader.trouble(u'ERROR: Invalid URL: %s' % url)
            return

I'm not a python dev, so I let you review and commit.
Thx for the project !

@ghost ghost assigned phihag Feb 18, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Feb 18, 2013

Thanks, we'll have a look at it.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 21, 2013

Thanks, merged!

@phihag phihag closed this in 1013186 Feb 21, 2013
@maximeg
Copy link
Author

@maximeg maximeg commented Feb 23, 2013

Thanks ;-)

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.