prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add support for nzz.ch
  rudolffischer@BueroPC-RF:~$ youtube-dl "http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209" -v
  [debug] System config: []
  [debug] User config: []
  [debug] Command-line args: ['http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209', '-v']
  [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
  [debug] youtube-dl version 2014.12.06.1
  [debug] Python version 2.7.6 - Linux-3.13.0-39-generic-x86_64-with-Ubuntu-14.04-trusty
  [debug] exe versions: rtmpdump 2.4
  [debug] Proxy map: {}
  [generic] 30-jahre-herzschmerz-aus-saas-fee-1: Requesting header
  WARNING: Falling back on generic information extractor.
  [generic] 30-jahre-herzschmerz-aus-saas-fee-1: Downloading webpage
  [generic] 30-jahre-herzschmerz-aus-saas-fee-1: Extracting information
  ERROR: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; 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/extractor/generic.py", line 651, in _real_extract
      doc = parse_xml(webpage)
    File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1425, in parse_xml
      tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
      parser.feed(text)
    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
      self._raiseerror(v)
    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
      raise err
  ParseError: not well-formed (invalid token): line 2, column 42
  Traceback (most recent call last):
    File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 553, in extract_info
      ie_result = ie.extract(url)
    File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 241, in extract
      return self._real_extract(url)
    File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1044, in _real_extract
      raise ExtractorError('Unsupported URL: %s' % url)
  ExtractorError: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; 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.
  
  rudolffischer@BueroPC-RF:~$ 
  
  
  </issue>
  <code>
  [start of youtube_dl/extractor/nzz.py]
  1 # coding: utf-8
  2 from __future__ import unicode_literals
  3 
  4 import re
  5 
  6 from .common import InfoExtractor
  7 from ..utils import (
  8     extract_attributes,
  9 )
  10 
  11 
  12 class NZZIE(InfoExtractor):
  13     _VALID_URL = r'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)'
  14     _TEST = {
  15         'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153',
  16         'info_dict': {
  17             'id': '9153',
  18         },
  19         'playlist_mincount': 6,
  20     }
  21 
  22     def _real_extract(self, url):
  23         page_id = self._match_id(url)
  24         webpage = self._download_webpage(url, page_id)
  25 
  26         entries = []
  27         for player_element in re.findall(r'(<[^>]+class="kalturaPlayer"[^>]*>)', webpage):
  28             player_params = extract_attributes(player_element)
  29             if player_params.get('data-type') not in ('kaltura_singleArticle',):
  30                 self.report_warning('Unsupported player type')
  31                 continue
  32             entry_id = player_params['data-id']
  33             entries.append(self.url_result(
  34                 'kaltura:1750922:' + entry_id, 'Kaltura', entry_id))
  35 
  36         return self.playlist_result(entries, page_id)
  37
  [end of youtube_dl/extractor/nzz.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/youtube_dl/extractor/nzz.py b/youtube_dl/extractor/nzz.py
  --- a/youtube_dl/extractor/nzz.py
  +++ b/youtube_dl/extractor/nzz.py
  @@ -11,20 +11,27 @@
   
   class NZZIE(InfoExtractor):
       _VALID_URL = r'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)'
  -    _TEST = {
  +    _TESTS = [{
           'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153',
           'info_dict': {
               'id': '9153',
           },
           'playlist_mincount': 6,
  -    }
  +    }, {
  +        'url': 'https://www.nzz.ch/video/nzz-standpunkte/cvp-auf-der-suche-nach-dem-mass-der-mitte-ld.1368112',
  +        'info_dict': {
  +            'id': '1368112',
  +        },
  +        'playlist_count': 1,
  +    }]
   
       def _real_extract(self, url):
           page_id = self._match_id(url)
           webpage = self._download_webpage(url, page_id)
   
           entries = []
  -        for player_element in re.findall(r'(<[^>]+class="kalturaPlayer"[^>]*>)', webpage):
  +        for player_element in re.findall(
  +                r'(<[^>]+class="kalturaPlayer[^"]*"[^>]*>)', webpage):
               player_params = extract_attributes(player_element)
               if player_params.get('data-type') not in ('kaltura_singleArticle',):
                   self.report_warning('Unsupported player type')
  
verification_info: {"golden_diff": "diff --git a/youtube_dl/extractor/nzz.py b/youtube_dl/extractor/nzz.py\n--- a/youtube_dl/extractor/nzz.py\n+++ b/youtube_dl/extractor/nzz.py\n@@ -11,20 +11,27 @@\n \n class NZZIE(InfoExtractor):\n     _VALID_URL = r'https?://(?:www\\.)?nzz\\.ch/(?:[^/]+/)*[^/?#]+-ld\\.(?P<id>\\d+)'\n-    _TEST = {\n+    _TESTS = [{\n         'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153',\n         'info_dict': {\n             'id': '9153',\n         },\n         'playlist_mincount': 6,\n-    }\n+    }, {\n+        'url': 'https://www.nzz.ch/video/nzz-standpunkte/cvp-auf-der-suche-nach-dem-mass-der-mitte-ld.1368112',\n+        'info_dict': {\n+            'id': '1368112',\n+        },\n+        'playlist_count': 1,\n+    }]\n \n     def _real_extract(self, url):\n         page_id = self._match_id(url)\n         webpage = self._download_webpage(url, page_id)\n \n         entries = []\n-        for player_element in re.findall(r'(<[^>]+class=\"kalturaPlayer\"[^>]*>)', webpage):\n+        for player_element in re.findall(\n+                r'(<[^>]+class=\"kalturaPlayer[^\"]*\"[^>]*>)', webpage):\n             player_params = extract_attributes(player_element)\n             if player_params.get('data-type') not in ('kaltura_singleArticle',):\n                 self.report_warning('Unsupported player type')\n", "issue": "Add support for nzz.ch\nrudolffischer@BueroPC-RF:~$ youtube-dl \"http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209\" -v\n[debug] System config: []\n[debug] User config: []\n[debug] Command-line args: ['http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209', '-v']\n[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n[debug] youtube-dl version 2014.12.06.1\n[debug] Python version 2.7.6 - Linux-3.13.0-39-generic-x86_64-with-Ubuntu-14.04-trusty\n[debug] exe versions: rtmpdump 2.4\n[debug] Proxy map: {}\n[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Requesting header\nWARNING: Falling back on generic information extractor.\n[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Downloading webpage\n[generic] 30-jahre-herzschmerz-aus-saas-fee-1: Extracting information\nERROR: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; 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.\nTraceback (most recent call last):\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 651, in _real_extract\n    doc = parse_xml(webpage)\n  File \"/usr/local/bin/youtube-dl/youtube_dl/utils.py\", line 1425, in parse_xml\n    tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1300, in XML\n    parser.feed(text)\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1642, in feed\n    self._raiseerror(v)\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1506, in _raiseerror\n    raise err\nParseError: not well-formed (invalid token): line 2, column 42\nTraceback (most recent call last):\n  File \"/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py\", line 553, in extract_info\n    ie_result = ie.extract(url)\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py\", line 241, in extract\n    return self._real_extract(url)\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py\", line 1044, in _real_extract\n    raise ExtractorError('Unsupported URL: %s' % url)\nExtractorError: Unsupported URL: http://www.nzz.ch/panorama/30-jahre-herzschmerz-aus-saas-fee-1.18438209; 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.\n\nrudolffischer@BueroPC-RF:~$ \n\n", "before_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n    extract_attributes,\n)\n\n\nclass NZZIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?nzz\\.ch/(?:[^/]+/)*[^/?#]+-ld\\.(?P<id>\\d+)'\n    _TEST = {\n        'url': 'http://www.nzz.ch/zuerich/gymizyte/gymizyte-schreiben-schueler-heute-noch-diktate-ld.9153',\n        'info_dict': {\n            'id': '9153',\n        },\n        'playlist_mincount': 6,\n    }\n\n    def _real_extract(self, url):\n        page_id = self._match_id(url)\n        webpage = self._download_webpage(url, page_id)\n\n        entries = []\n        for player_element in re.findall(r'(<[^>]+class=\"kalturaPlayer\"[^>]*>)', webpage):\n            player_params = extract_attributes(player_element)\n            if player_params.get('data-type') not in ('kaltura_singleArticle',):\n                self.report_warning('Unsupported player type')\n                continue\n            entry_id = player_params['data-id']\n            entries.append(self.url_result(\n                'kaltura:1750922:' + entry_id, 'Kaltura', entry_id))\n\n        return self.playlist_result(entries, page_id)\n", "path": "youtube_dl/extractor/nzz.py"}]}