Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new site of the first channel leads to Unsupported URL error #9249

Closed
kvk-2015 opened this issue Apr 20, 2016 · 1 comment
Closed

The new site of the first channel leads to Unsupported URL error #9249

kvk-2015 opened this issue Apr 20, 2016 · 1 comment
Labels

Comments

@kvk-2015
Copy link

@kvk-2015 kvk-2015 commented Apr 20, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.04.19

Before submitting an issue I have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', 'best', '--verbose', 'http://www.1tv.ru/shows/chto-gde-kogda/vypuski/chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016']
[debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251
[debug] youtube-dl version 2016.04.19
[debug] Python version 3.5.1 - Windows-10-10.0.10586-SP0
[debug] exe versions: ffmpeg N-79209-gb3eda69, ffprobe N-79209-gb3eda69
[debug] Proxy map: {}
[generic] chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016: Requesting header
WARNING: Falling back on generic information extractor.
[generic] chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016: Downloading webpage
[generic] chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016: Extracting information
ERROR: Unsupported URL: http://www.1tv.ru/shows/chto-gde-kogda/vypuski/chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016
Traceback (most recent call last):
  File "c:\users\*********\appdata\local\programs\python\python35-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 671, in extract_info
    ie_result = ie.extract(url)
  File "c:\users\*********\appdata\local\programs\python\python35-32\lib\site-packages\youtube_dl\extractor\common.py", line 341, in extract
    return self._real_extract(url)
  File "c:\users\*********\appdata\local\programs\python\python35-32\lib\site-packages\youtube_dl\extractor\generic.py", line 2044, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.1tv.ru/shows/chto-gde-kogda/vypuski/chetvertaya-igra-vesenney-serii-chto-gde-kogda-vypusk-ot-17042016

Description of issue, suggested solution and other information

About two weeks ago 1tv.ru introdused a new website where old extractor does not work.
Looks like this changes in firsttv.py fixes error:

import re
try:
    from html import unescape as html_unescape
except ImportError:
    html_unescape = lambda x: x.replace("&", "&")
...
    _VALID_URL = r'https?://(?:www\.)?1tv\.ru/(?:[^/]+/)*(?P<id>[a-z\d-]+)'
...
    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)
        mobj = re.search(r'data-playlist-url="(?P<playlist_url>[^"]+)".+?data-start-id="(?P<id>[^"]+)"', webpage)
        if mobj:
            video_id = mobj.group('id')
            playlist_url = html_unescape(mobj.group('playlist_url'))
            video = self._download_json("http://www.1tv.ru{0}".format(playlist_url), video_id, fatal=False)
        else:
            video = None
        description, thumbnail, upload_date, duration = [None] * 4
@kvk-2015 kvk-2015 changed the title can't download any video from www.1tv.ru after site changed its URL scheme can't download any video from www.1tv.ru after site changed its URL scheme (Unsupported URL) Apr 21, 2016
@kvk-2015 kvk-2015 changed the title can't download any video from www.1tv.ru after site changed its URL scheme (Unsupported URL) can't download any video from www.1tv.ru after site changed its URL scheme (Unsupported URL error) Apr 21, 2016
@kvk-2015 kvk-2015 changed the title can't download any video from www.1tv.ru after site changed its URL scheme (Unsupported URL error) The new site of the first channel [firsttv] leads to Unsupported URL error Apr 21, 2016
@kotofond
Copy link
Contributor

@kotofond kotofond commented Apr 21, 2016

I get youtube_dl.utils.ExtractorError: Could not find XML element ./channel/item when downloading another 1tv video:

D:\>youtube-dl --verbose https://www.1tv.ru/news/2016/04/21/300796-evropeyskaya_sistema_bezopasnosti_v_ocherednoy_raz_dala_sboy
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.1tv.ru/news/2016/04/21/300796-evropeyskaya_sistema_bezopasnosti_v_ocherednoy_raz_dala_sboy']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.04.19
[debug] Python version 3.5.1 - Windows-10-10.0.10586-SP0
[debug] exe versions: ffmpeg N-78358-g674cc26, ffprobe N-78358-g674cc26
[debug] Proxy map: {}
[1tv] 300796: Downloading JSON metadata
[1tv] 300796: Downloading XML
ERROR: Could not find XML element ./channel/item; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "c:\python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 671, in extract_info
    ie_result = ie.extract(url)
  File "c:\python35\lib\site-packages\youtube_dl\extractor\common.py", line 341, in extract
    return self._real_extract(url)
  File "c:\python35\lib\site-packages\youtube_dl\extractor\firsttv.py", line 99, in _real_extract
    item = xpath_element(video, './channel/item', fatal=True)
  File "c:\python35\lib\site-packages\youtube_dl\utils.py", line 210, in xpath_element
    raise ExtractorError('Could not find XML element %s' % name)
youtube_dl.utils.ExtractorError: Could not find XML element ./channel/item; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@yan12125 yan12125 added the broken-IE label Apr 21, 2016
@kvk-2015 kvk-2015 changed the title The new site of the first channel [firsttv] leads to Unsupported URL error The new site of the first channel leads to Unsupported URL error Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.