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

[Request / Bug] npo.nl video fragments (with possible memory leak) #4680

Closed
Reino17 opened this issue Jan 11, 2015 · 2 comments
Closed

[Request / Bug] npo.nl video fragments (with possible memory leak) #4680

Reino17 opened this issue Jan 11, 2015 · 2 comments

Comments

@Reino17
Copy link

@Reino17 Reino17 commented Jan 11, 2015

At the moment youtube-dl supports the HTTP Live Streams from npo.nl, but on npo.nl you can also watch video-fragments (progressive mp4-files), especially from newsbroadcasts.
This one for instance: http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771.

The html-source of interest of that page I believe starts at line 276:

<div class='program-show-page'>
<div class='showcase showcase-fluid with-player program-player' id='header'>
<div class='showcase-background' style=''>
<div class='showcase-wrapper'>
<div class='info no-overlay-for-small-screen'>
<div class='container'>
<div class='row-fluid title-and-broadcasters'>
<div class='broadcaster-logo'><a href="http://www.nos.nl" data-scorecard="{&quot;name&quot;:
&quot;nos&quot;,&quot;prefix&quot;:&quot;npo.softclick.programmas.extern&quot;}" target="_bl
ank" title="NOS"><img alt="Logo van NOS" class="no-shadow" src="//assets.www.npo.nl/uploads/
broadcaster/32/logo/regular_NOS.png" /></a></div>
<h1>Hoe gaat Europa verder na Parijs?</h1>
</div>
<div class='row-fluid videoplayer-and-metadata'>
<div class='span-main player-span'>
<div class="video-player-container" data-prid="WO_NOS_762771" data-video-player="true" id="v
ideo-player-container" itemscope="" itemtype="http://schema.org/VideoObject"><meta content="
Hoe gaat Europa verder na Parijs?" itemprop="name" /><meta content="" itemprop="description"
 /><meta itemprop="thumbnailUrl" /><meta itemprop="duration" /><div class="video-player-hold
er" id="video-player"></div></div>
<div class="video-player-settings"><div class="duration-and-views"></div><a href="#" class="
toggle-player-size" data-scorecard="{&quot;name&quot;:&quot;beeld-vergroten&quot;,&quot;pref
ix&quot;:&quot;npo.softclick.programmas&quot;}" data-toggle-player-size="" title="Beeld verg
roten / verkleinen"><span class="enlarge"><span class="npo-glyph expand"></span></span><span
 class="shrink"><span class="npo-glyph shrink"></span></span></a><a href="#" data-scorecard=
"{&quot;name&quot;:&quot;buitenland&quot;,&quot;prefix&quot;:&quot;npo.softclick.programmas&
quot;}" data-toggle-player-settings="" title="Instellingen"><span class="npo-glyph cog"></sp
an></a></div>
</div>

With the help of the Firefox addon 'DownloadHelper' the mp4-link for this video-fragment is: http://content1b.omroep.nl/urishieldv2/l27m4cf5841b713232ec0054b25e0a000000.42d94565c59f61f2c9d0f5bd05ef652a/nos/content/mp4/web03/2015/01/10/230394.mp4

Youtube-dl however puts out the following:

youtube-dl.exe -vF http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-vF', 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.01.10.2
[debug] Python version 2.7.8 - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-65810-g1b5ec6a
[debug] Proxy map: {}
[npo.nl] WO_NOS_762771: Downloading JSON metadata
[npo.nl] WO_NOS_762771: Downloading token
[npo.nl] WO_NOS_762771: Downloading stream 0 ASX playlist

...and after a couple of minutes and a 1GB larger pagefile...

Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "youtube_dl\__init__.pyo", line 365, in main
  File "youtube_dl\__init__.pyo", line 355, in _real_main
  File "youtube_dl\YoutubeDL.pyo", line 1208, in download
  File "youtube_dl\YoutubeDL.pyo", line 600, in extract_info
  File "youtube_dl\extractor\common.pyo", line 260, in extract
  File "youtube_dl\extractor\npo.pyo", line 75, in _real_extract
  File "youtube_dl\extractor\npo.pyo", line 131, in _get_info
  File "youtube_dl\extractor\common.pyo", line 411, in _download_xml
  File "xml\etree\ElementTree.pyo", line 1300, in XML
  File "xml\etree\ElementTree.pyo", line 1642, in feed
  File "xml\etree\ElementTree.pyo", line 1506, in _raiseerror
xml.etree.ElementTree.ParseError: out of memory: line 1, column 0
@dstftw dstftw closed this in a097706 Jan 11, 2015
dstftw added a commit that referenced this issue Jan 11, 2015
@Reino17
Copy link
Author

@Reino17 Reino17 commented Jan 11, 2015

I grabbed the latest source, and...

python -m youtube_dl -vF http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-vF', 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.01.11
[debug] Python version 3.4.2 - Windows-XP-5.1.2600-SP3
[debug] exe versions: none
[debug] Proxy map: {}
[npo.nl] WO_NOS_762771: Downloading JSON metadata
[npo.nl] WO_NOS_762771: Downloading token
Traceback (most recent call last):
  File "C:\Python\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\youtube-dl-master\youtube_dl\__main__.py", line 19, in <module>
    youtube_dl.main()
  File "D:\youtube-dl-master\youtube_dl\__init__.py", line 365, in main
    _real_main(argv)
  File "D:\youtube-dl-master\youtube_dl\__init__.py", line 355, in _real_main
    retcode = ydl.download(all_urls)
  File "D:\youtube-dl-master\youtube_dl\YoutubeDL.py", line 1205, in download
    res = self.extract_info(url)
  File "D:\youtube-dl-master\youtube_dl\YoutubeDL.py", line 600, in extract_info
    ie_result = ie.extract(url)
  File "D:\youtube-dl-master\youtube_dl\extractor\common.py", line 260, in extract
    return self._real_extract(url)
  File "D:\youtube-dl-master\youtube_dl\extractor\npo.py", line 86, in _real_extract
    return self._get_info(video_id)
  File "D:\youtube-dl-master\youtube_dl\extractor\npo.py", line 169, in _get_info
    'duration': parse_duration(metadata.get('tijdsduur')),
  File "D:\youtube-dl-master\youtube_dl\utils.py", line 1275, in parse_duration
    s = s.strip()
AttributeError: 'bool' object has no attribute 'strip'
@Reino17
Copy link
Author

@Reino17 Reino17 commented Jan 12, 2015

Ignore that last comment. It's working perfectly now.
Thanks a lot!

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.