Repository: ytdl-org/youtube-dl

Issue:
[Bug] crunchyroll: unable to extract video_uploader
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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
- [x] Bug report (encountered problems with youtube-dl)

---

```
youtube-dl.exe --write-sub --sub-format srt --sub-lang enUS --wri
te-description --ignore-errors http://www.crunchyroll.com/hakuoki-reimeiroku/epi
sode-1-dawn-of-the-divine-warriors-606899 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--write-sub', '--sub-format', 'srt', '--sub-lang',
'enUS', '--write-description', '--ignore-errors', 'http://www.crunchyroll.com/ha
kuoki-reimeiroku/episode-1-dawn-of-the-divine-warriors-606899', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.02.24.1
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-83410-gb1e2192, ffprobe N-83410-gb1e2192
[debug] Proxy map: {}
[Crunchyroll] 606899: Downloading webpage
WARNING: unable to extract video_uploader; please report this issue on https://y
t-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 co
mplete output.
[Crunchyroll] 606899: Downloading media info for 360p
[Crunchyroll] 606899: Downloading m3u8 information
[Crunchyroll] 606899: Downloading media info for 480p
[Crunchyroll] 606899: Downloading m3u8 information
[Crunchyroll] 606899: Downloading media info
[Crunchyroll] 606899: Downloading subtitles for English (US)
[Crunchyroll] 606899: Downloading subtitles for Español
[Crunchyroll] 606899: Downloading subtitles for Português (Brasil)
[info] Writing video description to: Hakuoki Reimeiroku Episode 1 - Dawn of the
Divine Warriors-606899.description
[info] Writing video subtitles to: Hakuoki Reimeiroku Episode 1 - Dawn of the Di
vine Warriors-606899.enUS.srt
[debug] Invoking downloader on 'https://v.vrv.co/evs/assets/9xv9hal5frpneaa_1676
325.mp4/index-v1-a1.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly92
LnZydi5jby9ldnMvYXNzZXRzLzl4djloYWw1ZnJwbmVhYV8xNjc2MzI1Lm1wNC8qIiwiQ29uZGl0aW9u
Ijp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNDg4MDY3NTc5fX19XX0_&Signature=g
F9bNOR8doDaZYNU3bVHfZXxryE~VfBdmHiJ5A~XMuTpHVcV~Ao1e364Zth3nigpiKD~OcLeCGlt1QrtB
vSxrc22rpSrdtHnfDLpb3eCOzu8vbd5sFbKsOwHEYnjzK2blfZJz9Nu4wUEa7wZuV9XDXrOPTrmqTZ~L
LdKrza04P~HWfui5jSIJE~o0-UibGVb3HEyp7OeOdz6hE24JucsNP0r6ytVlZDVFlZjx-rY0rN7GRznQ
eFl9N8HUWJuoKBgwQ5wer7rMJ5qQbMkUfsNDLVfkHV~1nUfXmGK~qipGgeU2HE0s2qPoY4nU6RZuRogE
qywMom9LjshrMB8sSJlnw__&Key-Pair-Id=APKAJKQQ2INNHTYFB44A'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 143
[download] Destination: Hakuoki Reimeiroku Episode 1 - Dawn of the Divine Warrio
rs-606899.mp4
[download] 100% of 72.88MiB in 01:05
[debug] ffmpeg command line: ffprobe -show_streams 'file:Hakuoki Reimeiroku Epis
ode 1 - Dawn of the Divine Warriors-606899.mp4'
[ffmpeg] Fixing malformated aac bitstream in "Hakuoki Reimeiroku Episode 1 - Daw
n of the Divine Warriors-606899.mp4"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Hakuoki Reimeiroku Episode 1 - D
awn of the Divine Warriors-606899.mp4' -c copy -f mp4 -bsf:a aac_adtstoasc 'file
:Hakuoki Reimeiroku Episode 1 - Dawn of the Divine Warriors-606899.temp.mp4'
...
<end of log>
```

---

- Single video: http://www.crunchyroll.com/hakuoki-reimeiroku/episode-1-dawn-of-the-divine-warriors-606899

---

Above error appeared, says to report it, video still downloads.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.py
--- a/youtube_dl/extractor/crunchyroll.py
+++ b/youtube_dl/extractor/crunchyroll.py
@@ -207,6 +207,21 @@ class CrunchyrollIE(CrunchyrollBaseIE):
             # Just test metadata extraction
             'skip_download': True,
         },
+    }, {
+        # make sure we can extract an uploader name that's not a link
+        'url': 'http://www.crunchyroll.com/hakuoki-reimeiroku/episode-1-dawn-of-the-divine-warriors-606899',
+        'info_dict': {
+            'id': '606899',
+            'ext': 'mp4',
+            'title': 'Hakuoki Reimeiroku Episode 1 – Dawn of the Divine Warriors',
+            'description': 'Ryunosuke was left to die, but Serizawa-san asked him a simple question "Do you want to live?"',
+            'uploader': 'Geneon Entertainment',
+            'upload_date': '20120717',
+        },
+        'params': {
+            # just test metadata extraction
+            'skip_download': True,
+        },
     }]
 
     _FORMAT_IDS = {
@@ -388,8 +403,9 @@ def _real_extract(self, url):
         if video_upload_date:
             video_upload_date = unified_strdate(video_upload_date)
         video_uploader = self._html_search_regex(
-            r'<a[^>]+href="/publisher/[^"]+"[^>]*>([^<]+)</a>', webpage,
-            'video_uploader', fatal=False)
+            # try looking for both an uploader that's a link and one that's not
+            [r'<a[^>]+href="/publisher/[^"]+"[^>]*>([^<]+)</a>', r'<div>\s*Publisher:\s*<span>\s*(.+?)\s*</span>\s*</div>'],
+            webpage, 'video_uploader', fatal=False)
 
         available_fmts = []
         for a, fmt in re.findall(r'(<a[^>]+token=["\']showmedia\.([0-9]{3,4})p["\'][^>]+>)', webpage):


Test patch: