internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ytdl-org/youtube-dl

Issue:
--format='bestvideo+bestaudio' --get-url crashes
Many videos are available in 1080p only in DASH formats. Often i prefer to play videos in mpv instead of saving to file, it supports external audio tracks. I guess youtube-dl should return several urls, may be in some special or custom format. Now it just crashes:

```
$ youtube-dl --format='bestvideo+bestaudio' --get-url https://www.youtube.com/watch?v=MjQG1s3Isgg
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 847, in main
    _real_main(argv)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/__init__.py", line 837, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1039, in download
    self.extract_info(url)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 527, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 564, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 819, in process_video_result
    self.process_info(new_info)
  File "/usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 860, in process_info
    self.to_stdout(info_dict['url'] + info_dict.get('play_path', ''))
KeyError: u'url'
```

```
$ youtube-dl --version
2014.05.05
```



Discussion:
I don't think that this is supported, youtube-dl doesn't mux DASH files, you have to do it yourself and download both files separately, then use ffmpeg or something similar to mux both files.

@filoozom it's supported (but undocumented), see #1612. youtube-dl will mux the two formats if you request them.

Also for this use case i do not need to mux video and audio, i just need urls, mpv will do the rest.

@jaimeMF Oh, didn't see, that's quite handy. Will try that asap.


Resolving patch:
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -942,8 +942,12 @@ def process_info(self, info_dict):
         if self.params.get('forceid', False):
             self.to_stdout(info_dict['id'])
         if self.params.get('forceurl', False):
-            # For RTMP URLs, also include the playpath
-            self.to_stdout(info_dict['url'] + info_dict.get('play_path', ''))
+            if info_dict.get('requested_formats') is not None:
+                for f in info_dict['requested_formats']:
+                    self.to_stdout(f['url'] + f.get('play_path', ''))
+            else:
+                # For RTMP URLs, also include the playpath
+                self.to_stdout(info_dict['url'] + info_dict.get('play_path', ''))
         if self.params.get('forcethumbnail', False) and info_dict.get('thumbnail') is not None:
             self.to_stdout(info_dict['thumbnail'])
         if self.params.get('forcedescription', False) and info_dict.get('description') is not None:


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
cannot download Daum tvpot url
cannot download video from Daum tvpot which is Korean internet portal service
http://tvpot.daum.net/v/vfb45BtrWBWWHKEkOwXEghB



Discussion:
$ youtube-dl --verbose -s -g http://tvpot.daum.net/v/vfb45BtrWBWWHKEkOwXEghB
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-s', '-g', 'http://tvpot.daum.net/v/vfb45BtrWBWWHKEkOwXEghB']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2014.12.17.2
[debug] Python version 2.7.6 - Linux-3.13.0-36-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, ffmpeg 2.5.2, ffprobe 2.5.2
[debug] Proxy map: {}
ERROR: Unable to extract full id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 592, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 243, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/daum.py", line 42, in _real_extract
    webpage, 'full id')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 489, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract full id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


Resolving patch:
diff --git a/youtube_dl/extractor/daum.py b/youtube_dl/extractor/daum.py
--- a/youtube_dl/extractor/daum.py
+++ b/youtube_dl/extractor/daum.py
@@ -38,7 +38,7 @@ def _real_extract(self, url):
         canonical_url = 'http://tvpot.daum.net/v/%s' % video_id
         webpage = self._download_webpage(canonical_url, video_id)
         full_id = self._search_regex(
-            r'<iframe src="http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"]',
+            r'src=["\']http://videofarm.daum.net/controller/video/viewer/Video.html\?.*?vid=(.+?)[&"\']',
             webpage, 'full id')
         query = compat_urllib_parse.urlencode({'vid': full_id})
         info = self._download_xml(


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Dumping to `stdout` is broken for version `2015.04.26`
As the subject says, if one tries to dump to `stdout` a video whose ID starts with an underscore (`_`), `youtube-dl` instead tries to save it to disk.

> youtube-dl --output - -- 'https://www.youtube.com/watch?v=_KYvp8PrCFc'



Discussion:
Maybe you need to specify the `best` format. E.g.

```
youtube-dl -f best --output - 'https://www.youtube.com/watch?v=_KYvp8PrCFc'
```

I think I've found the issue:  with the latest version (`2015.04.26`) it seems the option to write to `stdout` is broken (i.e. `--output -`).

I've downgraded to `2015.04.09` and it seems to be working now.

as @yan12125 said you have to use `-f best`, because when ffmpeg/avconv is installed youtube-dl now defaults to `-f bestvideo+bestaudio/best` which gives a better quality video. `bestvideo+bestaudio` doesn't currently support being dump to stdout, and with a naive approach the two files would need to be downloaded first, that's not what you want when reading from stdout. If you really need to output to stdout `bestvideo+bestaudio` feel free to open a new issue.


Resolving patch:
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -1086,7 +1086,9 @@ def process_video_result(self, info_dict, download=True):
         req_format = self.params.get('format')
         if req_format is None:
             req_format_list = []
-            if info_dict['extractor'] in ['youtube', 'ted'] and FFmpegMergerPP(self).available:
+            if (self.params.get('outtmpl', DEFAULT_OUTTMPL) != '-'
+                    and info_dict['extractor'] in ['youtube', 'ted']
+                    and FFmpegMergerPP(self).available):
                 req_format_list.append('bestvideo+bestaudio')
             req_format_list.append('best')
             req_format = '/'.join(req_format_list)


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
please add support for www.karrierevideos.at
urls like

http://www.karrierevideos.at/berufsvideos/mittlere-hoehere-schulen/altenpflegerin

thanks



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -244,6 +244,7 @@
 from .kanalplay import KanalPlayIE
 from .kankan import KankanIE
 from .karaoketv import KaraoketvIE
+from .karrierevideos import KarriereVideosIE
 from .keezmovies import KeezMoviesIE
 from .khanacademy import KhanAcademyIE
 from .kickstarter import KickStarterIE
diff --git a/youtube_dl/extractor/karrierevideos.py b/youtube_dl/extractor/karrierevideos.py
new file mode 100644
--- /dev/null
+++ b/youtube_dl/extractor/karrierevideos.py
@@ -0,0 +1,50 @@
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+
+class KarriereVideosIE(InfoExtractor):
+    _VALID_URL = r'http://(?:www\.)?karrierevideos\.at/berufsvideos/([a-z-]+)/(?P<id>[a-z-]+)'
+    _TEST = {
+        'url': 'http://www.karrierevideos.at/berufsvideos/mittlere-hoehere-schulen/altenpflegerin',
+        'info_dict': {
+            'id': 'altenpflegerin',
+            'ext': 'mp4',
+            'title': 'AltenpflegerIn',
+            'thumbnail': 're:^http://.*\.png\?v=[0-9]+',
+            'description': 'md5:dbadd1259fde2159a9b28667cb664ae2'
+        },
+        'params': {
+            'skip_download': 'requires rtmpdump'
+        }
+    }
+
+    def _real_extract(self, url):
+        video_id = self._match_id(url)
+        webpage = self._download_webpage(url, video_id)
+
+        description = self._html_search_regex(
+            r'<div class="leadtext">\n{0,}?\s{0,}<p>(.*?)</p>',
+            webpage, 'description')
+
+        playlist = self._html_search_regex(r'/config/video/(.*?)\.xml', webpage, 'playlist')
+        playlist = self._download_xml(
+            'http://www.karrierevideos.at/player-playlist.xml.php?p=' + playlist,
+            video_id)
+
+        namespace = 'http://developer.longtailvideo.com/trac/wiki/FlashFormats'
+
+        item = playlist.find('tracklist/item')
+        streamer = item.find('{%s}streamer' % namespace).text
+
+        return {
+            'id': video_id,
+            'title': self._html_search_meta('title', webpage),
+            'description': description,
+            'thumbnail': 'http://www.karrierevideos.at' + self._html_search_meta('thumbnail', webpage),
+            'protocol': 'rtmp',
+            'url': streamer.replace('rtmpt', 'http'),
+            'play_path': 'mp4:' + item.find('{%s}file' % namespace).text,
+            'tc_url': streamer,
+            'ext': 'mp4'
+        }


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Expand Niconico Video support
Niconico Video has two quality levels for a video, "normal" and "[economy](http://dic.nicovideo.jp/a/%E4%BD%8E%E7%94%BB%E8%B3%AA%E3%83%A2%E3%83%BC%E3%83%89)" (Japlish for "low"). Currently, using `youtube-dl -F` on a Niconico Video link only brings up one video quality:

```
format code  extension      resolution note
0            unknown_video  unknown
```

Expanding youtube-dl's functionality to include video quality would be nice. The url for the video file changes by having "low" added as a suffix (http://smile-fnl41.nicovideo.jp/smile?m=1097445.24697low vs. 
http://smile-fnl41.nicovideo.jp/smile?v=1097445.24697) (Economy mode can be forced by appending `?eco=1` to the end of a Niconico URL, for what it's worth)

It should be noted that normal users who don't pay up for a premium account may get the economy quality automatically from JST 6:00 PM to 2:00 AM on normal days, and JST 12:00 PM to 2:00 AM on Saturdays, Sundays, and holidays. If this affects youtube-dl's behavior of automatically getting the highest quality, the file size in bytes can be found in "size_high" (for normal quality) and "size_low" (for economy) at http://ext.nicovideo.jp/api/getthumbinfo/$VIDEO-ID (for example, http://ext.nicovideo.jp/api/getthumbinfo/sm1097445 for http://www.nicovideo.jp/watch/sm1097445)



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/niconico.py b/youtube_dl/extractor/niconico.py
--- a/youtube_dl/extractor/niconico.py
+++ b/youtube_dl/extractor/niconico.py
@@ -184,6 +184,11 @@ def _real_extract(self, url):
             extension = determine_ext(video_real_url)
         video_format = extension.upper()
 
+        if video_real_url.endswith('low'):
+            format_note = 'low'
+        else:
+            format_note = 'src'
+
         thumbnail = (
             xpath_text(video_info, './/thumbnail_url') or
             self._html_search_meta('image', webpage, 'thumbnail', default=None) or
@@ -242,6 +247,7 @@ def _real_extract(self, url):
             'title': title,
             'ext': extension,
             'format': video_format,
+            'format_note' : format_note,
             'thumbnail': thumbnail,
             'description': description,
             'uploader': uploader,


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
neteasemusic no longer works



Discussion:
[You haven't posted all the required info](https://github.com/rg3/youtube-dl/blob/edeb3e7cb1ab2d82ff7c712a7cc1e338a9dcd8f8/README.md#bugs), once you post it we'll reopen the issue and try to help you.

I do believe description is self sufficient, current master will faill all of the tests in youtube_dl/extractor/neteasemusic.py

and btw the issue is just with hardcoded m1.music.126.net server you use, m2.music.126.net works just fine

Confirmed.


Resolving patch:
diff --git a/youtube_dl/extractor/neteasemusic.py b/youtube_dl/extractor/neteasemusic.py
--- a/youtube_dl/extractor/neteasemusic.py
+++ b/youtube_dl/extractor/neteasemusic.py
@@ -40,7 +40,7 @@ def extract_formats(cls, info):
             if not details:
                 continue
             formats.append({
-                'url': 'http://m1.music.126.net/%s/%s.%s' %
+                'url': 'http://m5.music.126.net/%s/%s.%s' %
                        (cls._encrypt(details['dfsId']), details['dfsId'],
                         details['extension']),
                 'ext': details.get('extension'),


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
SITE REQUEST: www.5-tv.ru
Dear coders, I just visited this 5-tv.ru site, and I wanted to get news video from it, got no success.
Please, add this 5-tv.ru into YDL supported sources list. Thanks in advance!
The log is:
C:\>youtube-dl -v -F http://www.5-tv.ru/programs/broadcast/509514/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-F', 'http://www.5-tv.ru/programs/broadcast/509514/']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.06.12
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 3.3.1, ffprobe 3.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[FiveTV] 509514: Downloading webpage
ERROR: Unable to extract video url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its completeoutput.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\YoutubeDL.py", line 762,in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\extractor\common.py", line 433, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\extractor\fivetv.py", line 74, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkyaecyzu\build\youtube_dl\extractor\common.py", line 782, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract video url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/fivetv.py b/youtube_dl/extractor/fivetv.py
--- a/youtube_dl/extractor/fivetv.py
+++ b/youtube_dl/extractor/fivetv.py
@@ -43,7 +43,7 @@ class FiveTVIE(InfoExtractor):
         'info_dict': {
             'id': 'glavnoe',
             'ext': 'mp4',
-            'title': 'Итоги недели с 8 по 14 июня 2015 года',
+            'title': r're:^Итоги недели с \d+ по \d+ \w+ \d{4} года$',
             'thumbnail': r're:^https?://.*\.jpg$',
         },
     }, {
@@ -70,7 +70,8 @@ def _real_extract(self, url):
         webpage = self._download_webpage(url, video_id)
 
         video_url = self._search_regex(
-            r'<a[^>]+?href="([^"]+)"[^>]+?class="videoplayer"',
+            [r'<div[^>]+?class="flowplayer[^>]+?data-href="([^"]+)"',
+             r'<a[^>]+?href="([^"]+)"[^>]+?class="videoplayer"'],
             webpage, 'video url')
 
         title = self._og_search_title(webpage, default=None) or self._search_regex(


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
[bandcamp] wrong title for albums, programming help
## Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.08.13*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.08.13**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [x] Question
- [ ] Other

---

Bandcamp titles are not extracted in albums, e.g. http://music.businesscasual.biz/album/--8 only extracts the URLs. I want to extract the title but am not sure how to do it.

On this line:
https://github.com/rg3/youtube-dl/blob/485047854376465f95309daad4966971f56728ef/youtube_dl/extractor/bandcamp.py#L245
the div with the title is extracted already. I thought about using _html_search_meta, but it seems it only searches for the `content` attribute and not the actual `innerText` of the element – I'd like to extract it from the `itemprop="name"` selector.

bandcamp html:
![selection_103](https://user-images.githubusercontent.com/5013932/29351767-fd567846-8218-11e7-8ee7-9bbeedccafa6.png)

Is there another way to do this or do I need to extend the beautiful RegExp (still missing a proper HTML parser instead of using RegExp for this...)?


Discussion:
`_search_regex`.

Resolving patch:
diff --git a/youtube_dl/extractor/bandcamp.py b/youtube_dl/extractor/bandcamp.py
--- a/youtube_dl/extractor/bandcamp.py
+++ b/youtube_dl/extractor/bandcamp.py
@@ -242,7 +242,12 @@ def _real_extract(self, url):
             raise ExtractorError('The page doesn\'t contain any tracks')
         # Only tracks with duration info have songs
         entries = [
-            self.url_result(compat_urlparse.urljoin(url, t_path), ie=BandcampIE.ie_key())
+            self.url_result(
+                compat_urlparse.urljoin(url, t_path),
+                ie=BandcampIE.ie_key(),
+                video_title=self._search_regex(
+                    r'<span\b[^>]+\bitemprop=["\']name["\'][^>]*>([^<]+)',
+                    elem_content, 'track title', fatal=False))
             for elem_content, t_path in track_elements
             if self._html_search_meta('duration', elem_content, default=None)]
 


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Beeg json not found
Hello, been updating ytdl but the issue remains:

root@server:~/Downloads# youtube-dl -vv https://beeg.com/6484762
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vv', u'https://beeg.com/6484762']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.09.15
[debug] Python version 2.7.6 - Linux-3.13.0-129-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: ffmpeg N-75403-g3a8e447, ffprobe N-75403-g3a8e447, rtmpdump 2.4
[debug] Proxy map: {}
[Beeg] 6484762: Downloading webpage
[Beeg] 6484762: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 503, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2177, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/beeg.py b/youtube_dl/extractor/beeg.py
--- a/youtube_dl/extractor/beeg.py
+++ b/youtube_dl/extractor/beeg.py
@@ -9,6 +9,7 @@
 from ..utils import (
     int_or_none,
     parse_iso8601,
+    urljoin,
 )
 
 
@@ -36,9 +37,11 @@ def _real_extract(self, url):
         webpage = self._download_webpage(url, video_id)
 
         cpl_url = self._search_regex(
-            r'<script[^>]+src=(["\'])(?P<url>(?:https?:)?//static\.beeg\.com/cpl/\d+\.js.*?)\1',
+            r'<script[^>]+src=(["\'])(?P<url>(?:/static|(?:https?:)?//static\.beeg\.com)/cpl/\d+\.js.*?)\1',
             webpage, 'cpl', default=None, group='url')
 
+        cpl_url = urljoin(url, cpl_url)
+
         beeg_version, beeg_salt = [None] * 2
 
         if cpl_url:
@@ -54,7 +57,7 @@ def _real_extract(self, url):
                     r'beeg_salt\s*=\s*(["\'])(?P<beeg_salt>.+?)\1', cpl, 'beeg salt',
                     default=None, group='beeg_salt')
 
-        beeg_version = beeg_version or '2000'
+        beeg_version = beeg_version or '2185'
         beeg_salt = beeg_salt or 'pmweAkq8lAYKdfWcFCUj0yoVgoPlinamH5UE1CB3H'
 
         video = self._download_json(


Test patch: