소스 검색

[extractor/generic] Fix following incomplete redirects (#5640)

Sergey M․ 10 년 전
부모
커밋
406224be52
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      youtube_dl/extractor/generic.py

+ 1 - 1
youtube_dl/extractor/generic.py

@@ -1453,7 +1453,7 @@ class GenericIE(InfoExtractor):
                 if refresh_header:
                     found = re.search(REDIRECT_REGEX, refresh_header)
             if found:
-                new_url = found.group(1)
+                new_url = compat_urlparse.urljoin(url, found.group(1))
                 self.report_following_redirect(new_url)
                 return {
                     '_type': 'url',