aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/soulanime.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-04 02:20:45 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-04 02:20:45 +0100
commit2ccd1b10e58cc8e5173dc1aeedc2b3f0ef9b55bf (patch)
tree11fdba237df3f60d58698f4a602adf6b77da10e6 /youtube_dl/extractor/soulanime.py
parent788fa208c86d7196c75bdc74d8106a489723c054 (diff)
[soulanime] Fix under Python 3
Diffstat (limited to 'youtube_dl/extractor/soulanime.py')
-rw-r--r--youtube_dl/extractor/soulanime.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/soulanime.py b/youtube_dl/extractor/soulanime.py
index 7adb10c03..feef33e27 100644
--- a/youtube_dl/extractor/soulanime.py
+++ b/youtube_dl/extractor/soulanime.py
@@ -3,6 +3,10 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
+from ..utils import (
+ HEADRequest,
+ urlhandle_detect_ext,
+)
class SoulAnimeWatchingIE(InfoExtractor):
@@ -31,8 +35,10 @@ class SoulAnimeWatchingIE(InfoExtractor):
r'<div id="download">[^<]*<a href="(?P<url>[^"]+)"', page, 'url')
video_url = "http://www.soul-anime." + domain + video_url_encoded
- vid = self._request_webpage(video_url, video_id)
- ext = vid.info().gettype().split("/")[1]
+ ext_req = HEADRequest(video_url)
+ ext_handle = self._request_webpage(
+ ext_req, video_id, note='Determining extension')
+ ext = urlhandle_detect_ext(ext_handle)
return {
'id': video_id,