prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  openload.co extractor not working
   youtube-dl --get-url --verbose  https://openload.co/embed/kUEfGclsU9o/
  [debug] System config: []
  [debug] User config: []
  [debug] Command-line args: [u'--get-url', u'--verbose', u'https://openload.co/embed/kUEfGclsU9o/']
  [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
  [debug] youtube-dl version 2016.08.22
  [debug] Python version 2.6.6 - Linux-2.6.32-642.1.1.el6.x86_64-x86_64-with-centos-6.8-Final
  [debug] exe versions: ffmpeg 0.6.5, ffprobe 0.6.5
  [debug] Proxy map: {}
  ERROR: Unable to extract link image; 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 691, in extract_info
      ie_result = ie.extract(url)
    File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract
      return self._real_extract(url)
    File "/usr/local/bin/youtube-dl/youtube_dl/extractor/openload.py", line 62, in _real_extract
      r'<img[^>]+id="linkimg"[^>]+src="([^"]+)"', webpage, 'link image')
    File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 650, in _search_regex
      raise RegexNotFoundError('Unable to extract %s' % _name)
  RegexNotFoundError: Unable to extract link image; 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.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `youtube_dl/extractor/openload.py`
  Content:
  ```
  1 # coding: utf-8
  2 from __future__ import unicode_literals, division
  3 
  4 from .common import InfoExtractor
  5 from ..compat import (
  6     compat_chr,
  7     compat_ord,
  8 )
  9 from ..utils import (
  10     determine_ext,
  11     ExtractorError,
  12 )
  13 
  14 
  15 class OpenloadIE(InfoExtractor):
  16     _VALID_URL = r'https?://openload\.(?:co|io)/(?:f|embed)/(?P<id>[a-zA-Z0-9-_]+)'
  17 
  18     _TESTS = [{
  19         'url': 'https://openload.co/f/kUEfGclsU9o',
  20         'md5': 'bf1c059b004ebc7a256f89408e65c36e',
  21         'info_dict': {
  22             'id': 'kUEfGclsU9o',
  23             'ext': 'mp4',
  24             'title': 'skyrim_no-audio_1080.mp4',
  25             'thumbnail': 're:^https?://.*\.jpg$',
  26         },
  27     }, {
  28         'url': 'https://openload.co/embed/rjC09fkPLYs',
  29         'info_dict': {
  30             'id': 'rjC09fkPLYs',
  31             'ext': 'mp4',
  32             'title': 'movie.mp4',
  33             'thumbnail': 're:^https?://.*\.jpg$',
  34             'subtitles': {
  35                 'en': [{
  36                     'ext': 'vtt',
  37                 }],
  38             },
  39         },
  40         'params': {
  41             'skip_download': True,  # test subtitles only
  42         },
  43     }, {
  44         'url': 'https://openload.co/embed/kUEfGclsU9o/skyrim_no-audio_1080.mp4',
  45         'only_matching': True,
  46     }, {
  47         'url': 'https://openload.io/f/ZAn6oz-VZGE/',
  48         'only_matching': True,
  49     }, {
  50         'url': 'https://openload.co/f/_-ztPaZtMhM/',
  51         'only_matching': True,
  52     }, {
  53         # unavailable via https://openload.co/f/Sxz5sADo82g/, different layout
  54         # for title and ext
  55         'url': 'https://openload.co/embed/Sxz5sADo82g/',
  56         'only_matching': True,
  57     }]
  58 
  59     def _real_extract(self, url):
  60         video_id = self._match_id(url)
  61         webpage = self._download_webpage('https://openload.co/embed/%s/' % video_id, video_id)
  62 
  63         if 'File not found' in webpage or 'deleted by the owner' in webpage:
  64             raise ExtractorError('File not found', expected=True)
  65 
  66         # The following decryption algorithm is written by @yokrysty and
  67         # declared to be freely used in youtube-dl
  68         # See https://github.com/rg3/youtube-dl/issues/10408
  69         enc_data = self._html_search_regex(
  70             r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<span[^>]+id="streamurl"',
  71             webpage, 'encrypted data')
  72 
  73         video_url_chars = []
  74 
  75         for idx, c in enumerate(enc_data):
  76             j = compat_ord(c)
  77             if j >= 33 and j <= 126:
  78                 j = ((j + 14) % 94) + 33
  79             if idx == len(enc_data) - 1:
  80                 j += 2
  81             video_url_chars += compat_chr(j)
  82 
  83         video_url = 'https://openload.co/stream/%s?mime=true' % ''.join(video_url_chars)
  84 
  85         title = self._og_search_title(webpage, default=None) or self._search_regex(
  86             r'<span[^>]+class=["\']title["\'][^>]*>([^<]+)', webpage,
  87             'title', default=None) or self._html_search_meta(
  88             'description', webpage, 'title', fatal=True)
  89 
  90         entries = self._parse_html5_media_entries(url, webpage, video_id)
  91         subtitles = entries[0]['subtitles'] if entries else None
  92 
  93         info_dict = {
  94             'id': video_id,
  95             'title': title,
  96             'thumbnail': self._og_search_thumbnail(webpage, default=None),
  97             'url': video_url,
  98             # Seems all videos have extensions in their titles
  99             'ext': determine_ext(title),
  100             'subtitles': subtitles,
  101         }
  102 
  103         return info_dict
  104
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
  --- a/youtube_dl/extractor/openload.py
  +++ b/youtube_dl/extractor/openload.py
  @@ -70,10 +70,15 @@
               r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<span[^>]+id="streamurl"',
               webpage, 'encrypted data')
   
  +        magic = compat_ord(enc_data[-1])
           video_url_chars = []
   
           for idx, c in enumerate(enc_data):
               j = compat_ord(c)
  +            if j == magic:
  +                j -= 1
  +            elif j == magic - 1:
  +                j += 1
               if j >= 33 and j <= 126:
                   j = ((j + 14) % 94) + 33
               if idx == len(enc_data) - 1:
  
verification_info: {"golden_diff": "diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py\n--- a/youtube_dl/extractor/openload.py\n+++ b/youtube_dl/extractor/openload.py\n@@ -70,10 +70,15 @@\n             r'<span[^>]*>([^<]+)</span>\\s*<span[^>]*>[^<]+</span>\\s*<span[^>]+id=\"streamurl\"',\n             webpage, 'encrypted data')\n \n+        magic = compat_ord(enc_data[-1])\n         video_url_chars = []\n \n         for idx, c in enumerate(enc_data):\n             j = compat_ord(c)\n+            if j == magic:\n+                j -= 1\n+            elif j == magic - 1:\n+                j += 1\n             if j >= 33 and j <= 126:\n                 j = ((j + 14) % 94) + 33\n             if idx == len(enc_data) - 1:\n", "issue": "openload.co extractor not working\n youtube-dl --get-url --verbose  https://openload.co/embed/kUEfGclsU9o/\n[debug] System config: []\n[debug] User config: []\n[debug] Command-line args: [u'--get-url', u'--verbose', u'https://openload.co/embed/kUEfGclsU9o/']\n[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\n[debug] youtube-dl version 2016.08.22\n[debug] Python version 2.6.6 - Linux-2.6.32-642.1.1.el6.x86_64-x86_64-with-centos-6.8-Final\n[debug] exe versions: ffmpeg 0.6.5, ffprobe 0.6.5\n[debug] Proxy map: {}\nERROR: Unable to extract link image; 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/YoutubeDL.py\", line 691, in extract_info\n    ie_result = ie.extract(url)\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py\", line 347, in extract\n    return self._real_extract(url)\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/openload.py\", line 62, in _real_extract\n    r'<img[^>]+id=\"linkimg\"[^>]+src=\"([^\"]+)\"', webpage, 'link image')\n  File \"/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py\", line 650, in _search_regex\n    raise RegexNotFoundError('Unable to extract %s' % _name)\nRegexNotFoundError: Unable to extract link image; 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\n", "before_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals, division\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_chr,\n    compat_ord,\n)\nfrom ..utils import (\n    determine_ext,\n    ExtractorError,\n)\n\n\nclass OpenloadIE(InfoExtractor):\n    _VALID_URL = r'https?://openload\\.(?:co|io)/(?:f|embed)/(?P<id>[a-zA-Z0-9-_]+)'\n\n    _TESTS = [{\n        'url': 'https://openload.co/f/kUEfGclsU9o',\n        'md5': 'bf1c059b004ebc7a256f89408e65c36e',\n        'info_dict': {\n            'id': 'kUEfGclsU9o',\n            'ext': 'mp4',\n            'title': 'skyrim_no-audio_1080.mp4',\n            'thumbnail': 're:^https?://.*\\.jpg$',\n        },\n    }, {\n        'url': 'https://openload.co/embed/rjC09fkPLYs',\n        'info_dict': {\n            'id': 'rjC09fkPLYs',\n            'ext': 'mp4',\n            'title': 'movie.mp4',\n            'thumbnail': 're:^https?://.*\\.jpg$',\n            'subtitles': {\n                'en': [{\n                    'ext': 'vtt',\n                }],\n            },\n        },\n        'params': {\n            'skip_download': True,  # test subtitles only\n        },\n    }, {\n        'url': 'https://openload.co/embed/kUEfGclsU9o/skyrim_no-audio_1080.mp4',\n        'only_matching': True,\n    }, {\n        'url': 'https://openload.io/f/ZAn6oz-VZGE/',\n        'only_matching': True,\n    }, {\n        'url': 'https://openload.co/f/_-ztPaZtMhM/',\n        'only_matching': True,\n    }, {\n        # unavailable via https://openload.co/f/Sxz5sADo82g/, different layout\n        # for title and ext\n        'url': 'https://openload.co/embed/Sxz5sADo82g/',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage('https://openload.co/embed/%s/' % video_id, video_id)\n\n        if 'File not found' in webpage or 'deleted by the owner' in webpage:\n            raise ExtractorError('File not found', expected=True)\n\n        # The following decryption algorithm is written by @yokrysty and\n        # declared to be freely used in youtube-dl\n        # See https://github.com/rg3/youtube-dl/issues/10408\n        enc_data = self._html_search_regex(\n            r'<span[^>]*>([^<]+)</span>\\s*<span[^>]*>[^<]+</span>\\s*<span[^>]+id=\"streamurl\"',\n            webpage, 'encrypted data')\n\n        video_url_chars = []\n\n        for idx, c in enumerate(enc_data):\n            j = compat_ord(c)\n            if j >= 33 and j <= 126:\n                j = ((j + 14) % 94) + 33\n            if idx == len(enc_data) - 1:\n                j += 2\n            video_url_chars += compat_chr(j)\n\n        video_url = 'https://openload.co/stream/%s?mime=true' % ''.join(video_url_chars)\n\n        title = self._og_search_title(webpage, default=None) or self._search_regex(\n            r'<span[^>]+class=[\"\\']title[\"\\'][^>]*>([^<]+)', webpage,\n            'title', default=None) or self._html_search_meta(\n            'description', webpage, 'title', fatal=True)\n\n        entries = self._parse_html5_media_entries(url, webpage, video_id)\n        subtitles = entries[0]['subtitles'] if entries else None\n\n        info_dict = {\n            'id': video_id,\n            'title': title,\n            'thumbnail': self._og_search_thumbnail(webpage, default=None),\n            'url': video_url,\n            # Seems all videos have extensions in their titles\n            'ext': determine_ext(title),\n            'subtitles': subtitles,\n        }\n\n        return info_dict\n", "path": "youtube_dl/extractor/openload.py"}], "after_files": [{"content": "# coding: utf-8\nfrom __future__ import unicode_literals, division\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n    compat_chr,\n    compat_ord,\n)\nfrom ..utils import (\n    determine_ext,\n    ExtractorError,\n)\n\n\nclass OpenloadIE(InfoExtractor):\n    _VALID_URL = r'https?://openload\\.(?:co|io)/(?:f|embed)/(?P<id>[a-zA-Z0-9-_]+)'\n\n    _TESTS = [{\n        'url': 'https://openload.co/f/kUEfGclsU9o',\n        'md5': 'bf1c059b004ebc7a256f89408e65c36e',\n        'info_dict': {\n            'id': 'kUEfGclsU9o',\n            'ext': 'mp4',\n            'title': 'skyrim_no-audio_1080.mp4',\n            'thumbnail': 're:^https?://.*\\.jpg$',\n        },\n    }, {\n        'url': 'https://openload.co/embed/rjC09fkPLYs',\n        'info_dict': {\n            'id': 'rjC09fkPLYs',\n            'ext': 'mp4',\n            'title': 'movie.mp4',\n            'thumbnail': 're:^https?://.*\\.jpg$',\n            'subtitles': {\n                'en': [{\n                    'ext': 'vtt',\n                }],\n            },\n        },\n        'params': {\n            'skip_download': True,  # test subtitles only\n        },\n    }, {\n        'url': 'https://openload.co/embed/kUEfGclsU9o/skyrim_no-audio_1080.mp4',\n        'only_matching': True,\n    }, {\n        'url': 'https://openload.io/f/ZAn6oz-VZGE/',\n        'only_matching': True,\n    }, {\n        'url': 'https://openload.co/f/_-ztPaZtMhM/',\n        'only_matching': True,\n    }, {\n        # unavailable via https://openload.co/f/Sxz5sADo82g/, different layout\n        # for title and ext\n        'url': 'https://openload.co/embed/Sxz5sADo82g/',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage('https://openload.co/embed/%s/' % video_id, video_id)\n\n        if 'File not found' in webpage or 'deleted by the owner' in webpage:\n            raise ExtractorError('File not found', expected=True)\n\n        # The following decryption algorithm is written by @yokrysty and\n        # declared to be freely used in youtube-dl\n        # See https://github.com/rg3/youtube-dl/issues/10408\n        enc_data = self._html_search_regex(\n            r'<span[^>]*>([^<]+)</span>\\s*<span[^>]*>[^<]+</span>\\s*<span[^>]+id=\"streamurl\"',\n            webpage, 'encrypted data')\n\n        magic = compat_ord(enc_data[-1])\n        video_url_chars = []\n\n        for idx, c in enumerate(enc_data):\n            j = compat_ord(c)\n            if j == magic:\n                j -= 1\n            elif j == magic - 1:\n                j += 1\n            if j >= 33 and j <= 126:\n                j = ((j + 14) % 94) + 33\n            if idx == len(enc_data) - 1:\n                j += 2\n            video_url_chars += compat_chr(j)\n\n        video_url = 'https://openload.co/stream/%s?mime=true' % ''.join(video_url_chars)\n\n        title = self._og_search_title(webpage, default=None) or self._search_regex(\n            r'<span[^>]+class=[\"\\']title[\"\\'][^>]*>([^<]+)', webpage,\n            'title', default=None) or self._html_search_meta(\n            'description', webpage, 'title', fatal=True)\n\n        entries = self._parse_html5_media_entries(url, webpage, video_id)\n        subtitles = entries[0]['subtitles'] if entries else None\n\n        info_dict = {\n            'id': video_id,\n            'title': title,\n            'thumbnail': self._og_search_thumbnail(webpage, default=None),\n            'url': video_url,\n            # Seems all videos have extensions in their titles\n            'ext': determine_ext(title),\n            'subtitles': subtitles,\n        }\n\n        return info_dict\n", "path": "youtube_dl/extractor/openload.py"}]}