The following issues were found

youtube_dl/extractor/linkedin.py
14 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    float_or_none,
    int_or_none,
    urlencode_postdata,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    float_or_none,
    int_or_none,
    urlencode_postdata,
    urljoin,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    float_or_none,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 16 Column: 1

              )


class LinkedInLearningBaseIE(InfoExtractor):
    _NETRC_MACHINE = 'linkedin'
    _LOGIN_URL = 'https://www.linkedin.com/uas/login?trk=learning'

    def _call_api(self, course_slug, fields, video_slug=None, resolution=None):
        query = {

            

Reported by Pylint.

Missing class docstring
Error

Line: 16 Column: 1

              )


class LinkedInLearningBaseIE(InfoExtractor):
    _NETRC_MACHINE = 'linkedin'
    _LOGIN_URL = 'https://www.linkedin.com/uas/login?trk=learning'

    def _call_api(self, course_slug, fields, video_slug=None, resolution=None):
        query = {

            

Reported by Pylint.

Method could be a function
Error

Line: 39 Column: 5

                              'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value,
            }, query=query)['elements'][0]

    def _get_urn_id(self, video_data):
        urn = video_data.get('urn')
        if urn:
            mobj = re.search(r'urn:li:lyndaCourse:\d+,(\d+)', urn)
            if mobj:
                return mobj.group(1)

            

Reported by Pylint.

Either all return statements in a function should return an expression, or none of them should.
Error

Line: 39 Column: 5

                              'Csrf-Token': self._get_cookies(api_url)['JSESSIONID'].value,
            }, query=query)['elements'][0]

    def _get_urn_id(self, video_data):
        urn = video_data.get('urn')
        if urn:
            mobj = re.search(r'urn:li:lyndaCourse:\d+,(\d+)', urn)
            if mobj:
                return mobj.group(1)

            

Reported by Pylint.

Missing class docstring
Error

Line: 74 Column: 1

                          raise ExtractorError(error, expected=True)


class LinkedInLearningIE(LinkedInLearningBaseIE):
    IE_NAME = 'linkedin:learning'
    _VALID_URL = r'https?://(?:www\.)?linkedin\.com/learning/(?P<course_slug>[^/]+)/(?P<id>[^/?#]+)'
    _TEST = {
        'url': 'https://www.linkedin.com/learning/programming-foundations-fundamentals/welcome?autoplay=true',
        'md5': 'a1d74422ff0d5e66a792deb996693167',

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 74 Column: 1

                          raise ExtractorError(error, expected=True)


class LinkedInLearningIE(LinkedInLearningBaseIE):
    IE_NAME = 'linkedin:learning'
    _VALID_URL = r'https?://(?:www\.)?linkedin\.com/learning/(?P<course_slug>[^/]+)/(?P<id>[^/?#]+)'
    _TEST = {
        'url': 'https://www.linkedin.com/learning/programming-foundations-fundamentals/welcome?autoplay=true',
        'md5': 'a1d74422ff0d5e66a792deb996693167',

            

Reported by Pylint.

Line too long (110/100)
Error

Line: 78 Column: 1

                  IE_NAME = 'linkedin:learning'
    _VALID_URL = r'https?://(?:www\.)?linkedin\.com/learning/(?P<course_slug>[^/]+)/(?P<id>[^/?#]+)'
    _TEST = {
        'url': 'https://www.linkedin.com/learning/programming-foundations-fundamentals/welcome?autoplay=true',
        'md5': 'a1d74422ff0d5e66a792deb996693167',
        'info_dict': {
            'id': '90426',
            'ext': 'mp4',
            'title': 'Welcome',

            

Reported by Pylint.

youtube_dl/extractor/fc2.py
14 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import hashlib
import re

from .common import InfoExtractor
from ..compat import (
    compat_parse_qs,
    compat_urllib_request,
    compat_urlparse,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              import re

from .common import InfoExtractor
from ..compat import (
    compat_parse_qs,
    compat_urllib_request,
    compat_urlparse,
)
from ..utils import (

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

                  compat_urllib_request,
    compat_urlparse,
)
from ..utils import (
    ExtractorError,
    sanitized_Request,
    urlencode_postdata,
)


            

Reported by Pylint.

Use of insecure MD2, MD4, MD5, or SHA1 hash function.
Security blacklist

Line: 93
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b303-md5

                          thumbnail = self._og_search_thumbnail(webpage)
        refer = url.replace('/content/', '/a/content/') if '/a/content/' not in url else url

        mimi = hashlib.md5((video_id + '_gGddgPfeaf_gzyr').encode('utf-8')).hexdigest()

        info_url = (
            'http://video.fc2.com/ginfo.php?mimi={1:s}&href={2:s}&v={0:s}&fversion=WIN%2011%2C6%2C602%2C180&from=2&otag=0&upid={0:s}&tk=null&'.
            format(video_id, mimi, compat_urllib_request.quote(refer, safe=b'').replace('.', '%2E')))


            

Reported by Bandit.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import hashlib
import re

from .common import InfoExtractor
from ..compat import (
    compat_parse_qs,

            

Reported by Pylint.

Missing class docstring
Error

Line: 20 Column: 1

              )


class FC2IE(InfoExtractor):
    _VALID_URL = r'^(?:https?://video\.fc2\.com/(?:[^/]+/)*content/|fc2:)(?P<id>[^/]+)'
    IE_NAME = 'fc2'
    _NETRC_MACHINE = 'fc2'
    _TESTS = [{
        'url': 'http://video.fc2.com/en/content/20121103kUan1KHs',

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 20 Column: 1

              )


class FC2IE(InfoExtractor):
    _VALID_URL = r'^(?:https?://video\.fc2\.com/(?:[^/]+/)*content/|fc2:)(?P<id>[^/]+)'
    IE_NAME = 'fc2'
    _NETRC_MACHINE = 'fc2'
    _TESTS = [{
        'url': 'http://video.fc2.com/en/content/20121103kUan1KHs',

            

Reported by Pylint.

Line too long (108/100)
Error

Line: 65 Column: 1

                      request = sanitized_Request(
            'https://secure.id.fc2.com/index.php?mode=login&switch_language=en', login_data)

        login_results = self._download_webpage(request, None, note='Logging in', errnote='Unable to log in')
        if 'mode=redirect&login=done' not in login_results:
            self.report_warning('unable to log in: bad username or password')
            return False

        # this is also needed

            

Reported by Pylint.

Line too long (143/100)
Error

Line: 96 Column: 1

                      mimi = hashlib.md5((video_id + '_gGddgPfeaf_gzyr').encode('utf-8')).hexdigest()

        info_url = (
            'http://video.fc2.com/ginfo.php?mimi={1:s}&href={2:s}&v={0:s}&fversion=WIN%2011%2C6%2C602%2C180&from=2&otag=0&upid={0:s}&tk=null&'.
            format(video_id, mimi, compat_urllib_request.quote(refer, safe=b'').replace('.', '%2E')))

        info_webpage = self._download_webpage(
            info_url, video_id, note='Downloading info page')
        info = compat_urlparse.parse_qs(info_webpage)

            

Reported by Pylint.

Line too long (101/100)
Error

Line: 97 Column: 1

              
        info_url = (
            'http://video.fc2.com/ginfo.php?mimi={1:s}&href={2:s}&v={0:s}&fversion=WIN%2011%2C6%2C602%2C180&from=2&otag=0&upid={0:s}&tk=null&'.
            format(video_id, mimi, compat_urllib_request.quote(refer, safe=b'').replace('.', '%2E')))

        info_webpage = self._download_webpage(
            info_url, video_id, note='Downloading info page')
        info = compat_urlparse.parse_qs(info_webpage)


            

Reported by Pylint.

youtube_dl/extractor/myspace.py
14 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    int_or_none,
    parse_iso8601,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    int_or_none,
    parse_iso8601,
)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import re

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    int_or_none,

            

Reported by Pylint.

Missing class docstring
Error

Line: 14 Column: 1

              )


class MySpaceIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                    https?://
                        myspace\.com/[^/]+/
                        (?P<mediatype>
                            video/[^/]+/(?P<video_id>\d+)|

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 14 Column: 1

              )


class MySpaceIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                    https?://
                        myspace\.com/[^/]+/
                        (?P<mediatype>
                            video/[^/]+/(?P<video_id>\d+)|

            

Reported by Pylint.

Line too long (153/100)
Error

Line: 31 Column: 1

                          'id': '109594919',
            'ext': 'mp4',
            'title': 'Little Big Town',
            'description': 'This country quartet was all smiles while playing a sold out show at the Pacific Amphitheatre in Orange County, California.',
            'uploader': 'Five Minutes to the Stage',
            'uploader_id': 'fiveminutestothestage',
            'timestamp': 1414108751,
            'upload_date': '20141023',
        },

            

Reported by Pylint.

Line too long (102/100)
Error

Line: 50 Column: 1

                      },
    }, {
        'add_ie': ['Youtube'],
        'url': 'https://myspace.com/threedaysgrace/music/song/animal-i-have-become-28400208-28218041',
        'info_dict': {
            'id': 'xqds0B_meys',
            'ext': 'webm',
            'title': 'Three Days Grace - Animal I Have Become',
            'description': 'md5:8bd86b3693e72a077cf863a8530c54bb',

            

Reported by Pylint.

Line too long (106/100)
Error

Line: 64 Column: 1

                      'url': 'https://myspace.com/starset2/music/song/first-light-95799905-106964426',
        'only_matching': True,
    }, {
        'url': 'https://myspace.com/thelargemouthbassband/music/song/02-pure-eyes.mp3-94422330-105113388',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        mobj = re.match(self._VALID_URL, url)

            

Reported by Pylint.

Either all return statements in a function should return an expression, or none of them should.
Error

Line: 68 Column: 5

                      'only_matching': True,
    }]

    def _real_extract(self, url):
        mobj = re.match(self._VALID_URL, url)
        video_id = mobj.group('video_id') or mobj.group('song_id')
        is_song = mobj.group('mediatype').startswith('music/song')
        webpage = self._download_webpage(url, video_id)
        player_url = self._search_regex(

            

Reported by Pylint.

Line too long (107/100)
Error

Line: 76 Column: 1

                      player_url = self._search_regex(
            r'videoSwf":"([^"?]*)', webpage, 'player URL', fatal=False)

        def formats_from_stream_urls(stream_url, hls_stream_url, http_stream_url, width=None, height=None):
            formats = []
            vcodec = 'none' if is_song else None
            if hls_stream_url:
                formats.append({
                    'format_id': 'hls',

            

Reported by Pylint.

youtube_dl/extractor/zype.py
14 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import re

from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
    dict_get,
    ExtractorError,
    int_or_none,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import re

from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
    dict_get,
    ExtractorError,
    int_or_none,
    js_to_json,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
    dict_get,
    ExtractorError,
    int_or_none,
    js_to_json,
    parse_iso8601,

            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 51 Column: 17

                              r'\.(?:js|html)\?', '.json?', url), video_id)['response']
        except ExtractorError as e:
            if isinstance(e.cause, compat_HTTPError) and e.cause.code in (400, 401, 403):
                raise ExtractorError(self._parse_json(
                    e.cause.read().decode(), video_id)['message'], expected=True)
            raise

        body = response['body']
        video = response['video']

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import re

from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
    dict_get,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 17 Column: 1

              )


class ZypeIE(InfoExtractor):
    _ID_RE = r'[\da-fA-F]+'
    _COMMON_RE = r'//player\.zype\.com/embed/%s\.(?:js|json|html)\?.*?(?:access_token|(?:ap[ip]|player)_key)='
    _VALID_URL = r'https?:%s[^&]+' % (_COMMON_RE % ('(?P<id>%s)' % _ID_RE))
    _TEST = {
        'url': 'https://player.zype.com/embed/5b400b834b32992a310622b9.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ&autoplay=false&controls=true&da=false',

            

Reported by Pylint.

Missing class docstring
Error

Line: 17 Column: 1

              )


class ZypeIE(InfoExtractor):
    _ID_RE = r'[\da-fA-F]+'
    _COMMON_RE = r'//player\.zype\.com/embed/%s\.(?:js|json|html)\?.*?(?:access_token|(?:ap[ip]|player)_key)='
    _VALID_URL = r'https?:%s[^&]+' % (_COMMON_RE % ('(?P<id>%s)' % _ID_RE))
    _TEST = {
        'url': 'https://player.zype.com/embed/5b400b834b32992a310622b9.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ&autoplay=false&controls=true&da=false',

            

Reported by Pylint.

Line too long (110/100)
Error

Line: 19 Column: 1

              
class ZypeIE(InfoExtractor):
    _ID_RE = r'[\da-fA-F]+'
    _COMMON_RE = r'//player\.zype\.com/embed/%s\.(?:js|json|html)\?.*?(?:access_token|(?:ap[ip]|player)_key)='
    _VALID_URL = r'https?:%s[^&]+' % (_COMMON_RE % ('(?P<id>%s)' % _ID_RE))
    _TEST = {
        'url': 'https://player.zype.com/embed/5b400b834b32992a310622b9.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ&autoplay=false&controls=true&da=false',
        'md5': 'eaee31d474c76a955bdaba02a505c595',
        'info_dict': {

            

Reported by Pylint.

Line too long (186/100)
Error

Line: 22 Column: 1

                  _COMMON_RE = r'//player\.zype\.com/embed/%s\.(?:js|json|html)\?.*?(?:access_token|(?:ap[ip]|player)_key)='
    _VALID_URL = r'https?:%s[^&]+' % (_COMMON_RE % ('(?P<id>%s)' % _ID_RE))
    _TEST = {
        'url': 'https://player.zype.com/embed/5b400b834b32992a310622b9.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ&autoplay=false&controls=true&da=false',
        'md5': 'eaee31d474c76a955bdaba02a505c595',
        'info_dict': {
            'id': '5b400b834b32992a310622b9',
            'ext': 'mp4',
            'title': 'Smoky Barbecue Favorites',

            

Reported by Pylint.

Line too long (111/100)
Error

Line: 40 Column: 1

                      return [
            mobj.group('url')
            for mobj in re.finditer(
                r'<script[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?%s.+?)\1' % (ZypeIE._COMMON_RE % ZypeIE._ID_RE),
                webpage)]

    def _real_extract(self, url):
        video_id = self._match_id(url)


            

Reported by Pylint.

youtube_dl/extractor/rentv.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    determine_ext,
    int_or_none,
    url_or_none,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              from __future__ import unicode_literals

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    determine_ext,
    int_or_none,
    url_or_none,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    determine_ext,
    int_or_none,
    url_or_none,
)


            

Reported by Pylint.

TODO: invalid m3u8
Error

Line: 77 Column: 3

                          'description': 'Жертвами столкновения двух фур и микроавтобуса, по последним данным, стали семь человек.',
        }
    }, {
        # TODO: invalid m3u8
        'url': 'http://ren.tv/novosti/2015-09-25/sluchaynyy-prohozhiy-poymal-avtougonshchika-v-murmanske-video',
        'info_dict': {
            'id': 'playlist',
            'ext': 'mp4',
            'title': 'Случайный прохожий поймал автоугонщика в Мурманске. ВИДЕО | РЕН ТВ',

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    determine_ext,
    int_or_none,
    url_or_none,

            

Reported by Pylint.

Missing class docstring
Error

Line: 13 Column: 1

              )


class RENTVIE(InfoExtractor):
    _VALID_URL = r'(?:rentv:|https?://(?:www\.)?ren\.tv/(?:player|video/epizod)/)(?P<id>\d+)'
    _TESTS = [{
        'url': 'http://ren.tv/video/epizod/118577',
        'md5': 'd91851bf9af73c0ad9b2cdf76c127fbb',
        'info_dict': {

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 13 Column: 1

              )


class RENTVIE(InfoExtractor):
    _VALID_URL = r'(?:rentv:|https?://(?:www\.)?ren\.tv/(?:player|video/epizod)/)(?P<id>\d+)'
    _TESTS = [{
        'url': 'http://ren.tv/video/epizod/118577',
        'md5': 'd91851bf9af73c0ad9b2cdf76c127fbb',
        'info_dict': {

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 65 Column: 1

                      }


class RENTVArticleIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?ren\.tv/novosti/\d{4}-\d{2}-\d{2}/(?P<id>[^/?#]+)'
    _TESTS = [{
        'url': 'http://ren.tv/novosti/2016-10-26/video-mikroavtobus-popavshiy-v-dtp-s-gruzovikami-v-podmoskove-prevratilsya-v',
        'md5': 'ebd63c4680b167693745ab91343df1d6',
        'info_dict': {

            

Reported by Pylint.

Missing class docstring
Error

Line: 65 Column: 1

                      }


class RENTVArticleIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?ren\.tv/novosti/\d{4}-\d{2}-\d{2}/(?P<id>[^/?#]+)'
    _TESTS = [{
        'url': 'http://ren.tv/novosti/2016-10-26/video-mikroavtobus-popavshiy-v-dtp-s-gruzovikami-v-podmoskove-prevratilsya-v',
        'md5': 'ebd63c4680b167693745ab91343df1d6',
        'info_dict': {

            

Reported by Pylint.

Line too long (127/100)
Error

Line: 68 Column: 1

              class RENTVArticleIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?ren\.tv/novosti/\d{4}-\d{2}-\d{2}/(?P<id>[^/?#]+)'
    _TESTS = [{
        'url': 'http://ren.tv/novosti/2016-10-26/video-mikroavtobus-popavshiy-v-dtp-s-gruzovikami-v-podmoskove-prevratilsya-v',
        'md5': 'ebd63c4680b167693745ab91343df1d6',
        'info_dict': {
            'id': '136472',
            'ext': 'mp4',
            'title': 'Видео: микроавтобус, попавший в ДТП с грузовиками в Подмосковье, превратился в груду металла',

            

Reported by Pylint.

youtube_dl/extractor/ellentube.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 4 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor
from ..utils import (
    clean_html,
    extract_attributes,
    float_or_none,
    int_or_none,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 5 Column: 1

              from __future__ import unicode_literals

from .common import InfoExtractor
from ..utils import (
    clean_html,
    extract_attributes,
    float_or_none,
    int_or_none,
    try_get,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor
from ..utils import (
    clean_html,
    extract_attributes,
    float_or_none,
    int_or_none,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 14 Column: 1

              )


class EllenTubeBaseIE(InfoExtractor):
    def _extract_data_config(self, webpage, video_id):
        details = self._search_regex(
            r'(<[^>]+\bdata-component=(["\'])[Dd]etails.+?></div>)', webpage,
            'details')
        return self._parse_json(

            

Reported by Pylint.

Missing class docstring
Error

Line: 14 Column: 1

              )


class EllenTubeBaseIE(InfoExtractor):
    def _extract_data_config(self, webpage, video_id):
        details = self._search_regex(
            r'(<[^>]+\bdata-component=(["\'])[Dd]etails.+?></div>)', webpage,
            'details')
        return self._parse_json(

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 54 Column: 1

                      }


class EllenTubeIE(EllenTubeBaseIE):
    _VALID_URL = r'''(?x)
                        (?:
                            ellentube:|
                            https://api-prod\.ellentube\.com/ellenapi/api/item/
                        )

            

Reported by Pylint.

Missing class docstring
Error

Line: 54 Column: 1

                      }


class EllenTubeIE(EllenTubeBaseIE):
    _VALID_URL = r'''(?x)
                        (?:
                            ellentube:|
                            https://api-prod\.ellentube\.com/ellenapi/api/item/
                        )

            

Reported by Pylint.

Line too long (103/100)
Error

Line: 63 Column: 1

                                      (?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})
                    '''
    _TESTS = [{
        'url': 'https://api-prod.ellentube.com/ellenapi/api/item/0822171c-3829-43bf-b99f-d77358ae75e3',
        'md5': '2fabc277131bddafdd120e0fc0f974c9',
        'info_dict': {
            'id': '0822171c-3829-43bf-b99f-d77358ae75e3',
            'ext': 'mp4',
            'title': 'Ellen Meets Las Vegas Survivors Jesus Campos and Stephen Schuck',

            

Reported by Pylint.

Missing class docstring
Error

Line: 90 Column: 1

                      return self._extract_video(data, video_id)


class EllenTubeVideoIE(EllenTubeBaseIE):
    _VALID_URL = r'https?://(?:www\.)?ellentube\.com/video/(?P<id>.+?)\.html'
    _TEST = {
        'url': 'https://www.ellentube.com/video/ellen-meets-las-vegas-survivors-jesus-campos-and-stephen-schuck.html',
        'only_matching': True,
    }

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 90 Column: 1

                      return self._extract_video(data, video_id)


class EllenTubeVideoIE(EllenTubeBaseIE):
    _VALID_URL = r'https?://(?:www\.)?ellentube\.com/video/(?P<id>.+?)\.html'
    _TEST = {
        'url': 'https://www.ellentube.com/video/ellen-meets-las-vegas-survivors-jesus-campos-and-stephen-schuck.html',
        'only_matching': True,
    }

            

Reported by Pylint.

youtube_dl/extractor/eighttracks.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import json
import random

from .common import InfoExtractor
from ..compat import (
    compat_str,
)
from ..utils import (
    ExtractorError,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              import random

from .common import InfoExtractor
from ..compat import (
    compat_str,
)
from ..utils import (
    ExtractorError,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              from ..compat import (
    compat_str,
)
from ..utils import (
    ExtractorError,
)


class EightTracksIE(InfoExtractor):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import json
import random

from .common import InfoExtractor
from ..compat import (
    compat_str,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 16 Column: 1

              )


class EightTracksIE(InfoExtractor):
    IE_NAME = '8tracks'
    _VALID_URL = r'https?://8tracks\.com/(?P<user>[^/]+)/(?P<id>[^/#]+)(?:#.*)?$'
    _TEST = {
        'name': 'EightTracks',
        'url': 'http://8tracks.com/ytdl/youtube-dl-test-tracks-a',

            

Reported by Pylint.

Missing class docstring
Error

Line: 16 Column: 1

              )


class EightTracksIE(InfoExtractor):
    IE_NAME = '8tracks'
    _VALID_URL = r'https?://8tracks\.com/(?P<user>[^/]+)/(?P<id>[^/#]+)(?:#.*)?$'
    _TEST = {
        'name': 'EightTracks',
        'url': 'http://8tracks.com/ytdl/youtube-dl-test-tracks-a',

            

Reported by Pylint.

Line too long (103/100)
Error

Line: 52 Column: 1

                              'info_dict': {
                    'id': '11885679',
                    'ext': 'm4a',
                    'title': "youtube-dl project as well - youtube-dl test track 3 \"'/\\\u00e4\u21ad",
                    'uploader_id': 'ytdl'
                }
            },
            {
                'md5': '4eb0a669317cd725f6bbd336a29f923a',

            

Reported by Pylint.

Line too long (103/100)
Error

Line: 61 Column: 1

                              'info_dict': {
                    'id': '11885680',
                    'ext': 'm4a',
                    'title': "youtube-dl project as well - youtube-dl test track 4 \"'/\\\u00e4\u21ad",
                    'uploader_id': 'ytdl'
                }
            },
            {
                'md5': '1893e872e263a2705558d1d319ad19e8',

            

Reported by Pylint.

Too many local variables (19/15)
Error

Line: 104 Column: 5

                      ]
    }

    def _real_extract(self, url):
        playlist_id = self._match_id(url)

        webpage = self._download_webpage(url, playlist_id)

        data = self._parse_json(

            

Reported by Pylint.

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Security blacklist

Line: 114
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b311-random

                              r"(?s)PAGE\.mix\s*=\s*({.+?});\n", webpage, 'trax information'),
            playlist_id)

        session = str(random.randint(0, 1000000000))
        mix_id = data['id']
        track_count = data['tracks_count']
        duration = data['duration']
        avg_song_duration = float(duration) / track_count
        # duration is sometimes negative, use predefined avg duration

            

Reported by Bandit.

youtube_dl/extractor/tv5unis.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import re

from .common import InfoExtractor
from ..utils import (
    int_or_none,
    parse_age_limit,
    smuggle_url,
    try_get,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import re

from .common import InfoExtractor
from ..utils import (
    int_or_none,
    parse_age_limit,
    smuggle_url,
    try_get,
)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import re

from .common import InfoExtractor
from ..utils import (
    int_or_none,
    parse_age_limit,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 15 Column: 1

              )


class TV5UnisBaseIE(InfoExtractor):
    _GEO_COUNTRIES = ['CA']

    def _real_extract(self, url):
        groups = re.match(self._VALID_URL, url).groups()
        product = self._download_json(

            

Reported by Pylint.

Missing class docstring
Error

Line: 15 Column: 1

              )


class TV5UnisBaseIE(InfoExtractor):
    _GEO_COUNTRIES = ['CA']

    def _real_extract(self, url):
        groups = re.match(self._VALID_URL, url).groups()
        product = self._download_json(

            

Reported by Pylint.

Line too long (102/100)
Error

Line: 48 Column: 1

                          '_type': 'url_transparent',
            'id': media_id,
            'title': product.get('title'),
            'url': smuggle_url('limelight:media:' + media_id, {'geo_countries': self._GEO_COUNTRIES}),
            'age_limit': parse_age_limit(try_get(product, lambda x: x['rating']['name'])),
            'tags': product.get('tags'),
            'series': try_get(product, lambda x: x['collection']['title']),
            'season_number': int_or_none(product.get('seasonNumber')),
            'episode_number': int_or_none(product.get('episodeNumber')),

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 58 Column: 1

                      }


class TV5UnisVideoIE(TV5UnisBaseIE):
    IE_NAME = 'tv5unis:video'
    _VALID_URL = r'https?://(?:www\.)?tv5unis\.ca/videos/[^/]+/(?P<id>\d+)'
    _TEST = {
        'url': 'https://www.tv5unis.ca/videos/bande-annonces/71843',
        'md5': '3d794164928bda97fb87a17e89923d9b',

            

Reported by Pylint.

Missing class docstring
Error

Line: 58 Column: 1

                      }


class TV5UnisVideoIE(TV5UnisBaseIE):
    IE_NAME = 'tv5unis:video'
    _VALID_URL = r'https?://(?:www\.)?tv5unis\.ca/videos/[^/]+/(?P<id>\d+)'
    _TEST = {
        'url': 'https://www.tv5unis.ca/videos/bande-annonces/71843',
        'md5': '3d794164928bda97fb87a17e89923d9b',

            

Reported by Pylint.

Missing class docstring
Error

Line: 78 Column: 1

                      return 'id: %s' % groups


class TV5UnisIE(TV5UnisBaseIE):
    IE_NAME = 'tv5unis'
    _VALID_URL = r'https?://(?:www\.)?tv5unis\.ca/videos/(?P<id>[^/]+)(?:/saisons/(?P<season_number>\d+)/episodes/(?P<episode_number>\d+))?/?(?:[?#&]|$)'
    _TESTS = [{
        'url': 'https://www.tv5unis.ca/videos/watatatow/saisons/6/episodes/1',
        'md5': 'a479907d2e531a73e1f8dc48d6388d02',

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 78 Column: 1

                      return 'id: %s' % groups


class TV5UnisIE(TV5UnisBaseIE):
    IE_NAME = 'tv5unis'
    _VALID_URL = r'https?://(?:www\.)?tv5unis\.ca/videos/(?P<id>[^/]+)(?:/saisons/(?P<season_number>\d+)/episodes/(?P<episode_number>\d+))?/?(?:[?#&]|$)'
    _TESTS = [{
        'url': 'https://www.tv5unis.ca/videos/watatatow/saisons/6/episodes/1',
        'md5': 'a479907d2e531a73e1f8dc48d6388d02',

            

Reported by Pylint.

youtube_dl/extractor/spreaker.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import itertools

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    float_or_none,
    int_or_none,
    str_or_none,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import itertools

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    float_or_none,
    int_or_none,
    str_or_none,
    try_get,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 8 Column: 1

              
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    float_or_none,
    int_or_none,
    str_or_none,
    try_get,
    unified_timestamp,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import itertools

from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
    float_or_none,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 64 Column: 1

                  }


class SpreakerIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                    https?://
                        api\.spreaker\.com/
                        (?:
                            (?:download/)?episode|

            

Reported by Pylint.

Missing class docstring
Error

Line: 64 Column: 1

                  }


class SpreakerIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                    https?://
                        api\.spreaker\.com/
                        (?:
                            (?:download/)?episode|

            

Reported by Pylint.

Line too long (113/100)
Error

Line: 93 Column: 1

                          'series': 'Success With Music (SWM)',
        },
    }, {
        'url': 'https://api.spreaker.com/download/episode/12534508/swm_ep15_how_to_market_your_music_part_2.mp3',
        'only_matching': True,
    }, {
        'url': 'https://api.spreaker.com/v2/episodes/12534508?export=episode_segments',
        'only_matching': True,
    }]

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 108 Column: 1

                      return _extract_episode(data, episode_id)


class SpreakerPageIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?spreaker\.com/user/[^/]+/(?P<id>[^/?#&]+)'
    _TESTS = [{
        'url': 'https://www.spreaker.com/user/9780658/swm-ep15-how-to-market-your-music-part-2',
        'only_matching': True,
    }]

            

Reported by Pylint.

Missing class docstring
Error

Line: 108 Column: 1

                      return _extract_episode(data, episode_id)


class SpreakerPageIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?spreaker\.com/user/[^/]+/(?P<id>[^/?#&]+)'
    _TESTS = [{
        'url': 'https://www.spreaker.com/user/9780658/swm-ep15-how-to-market-your-music-part-2',
        'only_matching': True,
    }]

            

Reported by Pylint.

Missing class docstring
Error

Line: 126 Column: 1

                          ie=SpreakerIE.ie_key(), video_id=episode_id)


class SpreakerShowIE(InfoExtractor):
    _VALID_URL = r'https?://api\.spreaker\.com/show/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://api.spreaker.com/show/4652058',
        'info_dict': {
            'id': '4652058',

            

Reported by Pylint.

youtube_dl/extractor/odnoklassniki.py
13 issues
Attempted relative import beyond top-level package
Error

Line: 6 Column: 1

              
import re

from .common import InfoExtractor
from ..compat import (
    compat_etree_fromstring,
    compat_parse_qs,
    compat_urllib_parse_unquote,
    compat_urllib_parse_urlparse,

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 7 Column: 1

              import re

from .common import InfoExtractor
from ..compat import (
    compat_etree_fromstring,
    compat_parse_qs,
    compat_urllib_parse_unquote,
    compat_urllib_parse_urlparse,
)

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 13 Column: 1

                  compat_urllib_parse_unquote,
    compat_urllib_parse_urlparse,
)
from ..utils import (
    ExtractorError,
    unified_strdate,
    int_or_none,
    qualities,
    unescapeHTML,

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # coding: utf-8
from __future__ import unicode_literals

import re

from .common import InfoExtractor
from ..compat import (
    compat_etree_fromstring,
    compat_parse_qs,

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 23 Column: 1

              )


class OdnoklassnikiIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                https?://
                    (?:(?:www|m|mobile)\.)?
                    (?:odnoklassniki|ok)\.ru/
                    (?:

            

Reported by Pylint.

Missing class docstring
Error

Line: 23 Column: 1

              )


class OdnoklassnikiIE(InfoExtractor):
    _VALID_URL = r'''(?x)
                https?://
                    (?:(?:www|m|mobile)\.)?
                    (?:odnoklassniki|ok)\.ru/
                    (?:

            

Reported by Pylint.

Line too long (552/100)
Error

Line: 118 Column: 1

                      'url': 'https://www.ok.ru/live/484531969818',
        'only_matching': True,
    }, {
        'url': 'https://m.ok.ru/dk?st.cmd=movieLayer&st.discId=863789452017&st.retLoc=friend&st.rtu=%2Fdk%3Fst.cmd%3DfriendMovies%26st.mode%3Down%26st.mrkId%3D%257B%2522uploadedMovieMarker%2522%253A%257B%2522marker%2522%253A%25221519410114503%2522%252C%2522hasMore%2522%253Atrue%257D%252C%2522sharedMovieMarker%2522%253A%257B%2522marker%2522%253Anull%252C%2522hasMore%2522%253Afalse%257D%257D%26st.friendId%3D561722190321%26st.frwd%3Don%26_prevCmd%3DfriendMovies%26tkn%3D7257&st.discType=MOVIE&st.mvId=863789452017&_prevCmd=friendMovies&tkn=3648#lst#',
        'only_matching': True,
    }, {
        # Paid video
        'url': 'https://ok.ru/video/954886983203',
        'only_matching': True,

            

Reported by Pylint.

Either all return statements in a function should return an expression, or none of them should.
Error

Line: 127 Column: 5

                  }]

    @staticmethod
    def _extract_url(webpage):
        mobj = re.search(
            r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:odnoklassniki|ok)\.ru/videoembed/.+?)\1', webpage)
        if mobj:
            return mobj.group('url')


            

Reported by Pylint.

Line too long (112/100)
Error

Line: 129 Column: 1

                  @staticmethod
    def _extract_url(webpage):
        mobj = re.search(
            r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:odnoklassniki|ok)\.ru/videoembed/.+?)\1', webpage)
        if mobj:
            return mobj.group('url')

    def _real_extract(self, url):
        start_time = int_or_none(compat_parse_qs(

            

Reported by Pylint.

Too many statements (61/50)
Error

Line: 133 Column: 5

                      if mobj:
            return mobj.group('url')

    def _real_extract(self, url):
        start_time = int_or_none(compat_parse_qs(
            compat_urllib_parse_urlparse(url).query).get('fromTime', [None])[0])

        video_id = self._match_id(url)


            

Reported by Pylint.