Browse Source

remove vid.me, went out of business

Helmut Pozimski 6 years ago
parent
commit
a4ac624d06
2 changed files with 0 additions and 98 deletions
  1. 0 4
      lib_stov/subscription.py
  2. 0 94
      lib_stov/vidme.py

+ 0 - 4
lib_stov/subscription.py

@@ -24,7 +24,6 @@ from lib_stov import stov_exceptions
 from lib_stov import yt_noapi
 from lib_stov import zdf_mediathek
 from lib_stov import twitch
-from lib_stov import vidme
 
 
 LOGGER = logging.getLogger("stov")
@@ -66,9 +65,6 @@ class Sub(object):
         elif site == "twitch":
             self._connector = twitch.Connector(self._type, self._name,
                                                self._conf, self._search)
-        elif site == "vidme":
-            self._connector = vidme.Connector(self._type, self._name,
-                                              self._conf, self._search)
         else:
             raise stov_exceptions.SiteUnsupported()
 

+ 0 - 94
lib_stov/vidme.py

@@ -1,94 +0,0 @@
-#
-#   This file is part of stov, written by Helmut Pozimski 2012-2017.
-#
-#   stov is free software: you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation, version 2 of the License.
-#
-#   stov is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License
-#   along with stov.  If not, see <http://www.gnu.org/licenses/>.
-
-
-# -*- coding: utf8 -*-
-
-""" This module implements support for subscriptions from twitch.tv"""
-
-import urllib.parse
-import urllib.request
-import urllib.error
-import logging
-
-from lib_stov import stov_exceptions
-from lib_stov import yt_noapi
-
-LOGGER = logging.getLogger("stov")
-
-
-class Connector(yt_noapi.Connector):
-    """ Connector class, performing calls to youtube-dl to retrieve
-        information about videos from vid.me
-    """
-    def __init__(self, subscription_type, name, conf, search=""):
-        yt_noapi.Connector.__init__(self, subscription_type, name, conf,
-                                    search)
-
-    def _construct_url(self):
-        """Constructs the URL to request from youtube-dl according to the
-        subscription type and the given parameters.
-        """
-        if self._type == "user":
-            self._url = "https://vid.me/%s" \
-                        % urllib.parse.quote(self._name)
-        elif self._type == "search":
-            raise stov_exceptions.TypeNotSupported()
-        elif self._type == "playlist":
-            raise stov_exceptions.TypeNotSupported()
-        LOGGER.debug(_("Constructed URL for subscription: %s"), self._url)
-
-    @staticmethod
-    def construct_video_url(ytid):
-        """
-        Resturns the URL to a specified youtube video
-
-        :param ytid: Youtube ID of the video
-        :type ytid: str
-        :return: Video URL
-        :rtype: str
-        """
-        url = "https://vid.me/%s" % ytid
-        return url
-
-    @staticmethod
-    def get_quality_parameter(config):
-        """Determines which itag value results from codec and resolution
-        settings and returns it
-
-        :param config: configuration object
-        :type config: lib_stov.configuration.Conf
-        :return: itag value
-        :rtype: str
-        """
-        LOGGER.debug(_("Trying to determine the itag value for youtube-dl from"
-                       " your quality and codec settings."))
-        quality_value = ""
-        if config.values["videocodec"] == "mp4":
-            if config.values["maxresolution"] == "480p":
-                quality_value = "hls-2155"
-            elif config.values["maxresolution"] == "720p":
-                quality_value = "hls-2297"
-            elif config.values["maxresolution"] == "1080p":
-                quality_value = "hls-2265"
-        if quality_value:
-            LOGGER.debug(_("Found value: %s."), quality_value)
-            return quality_value + "/" + config.values["videocodec"] + \
-                "+bestaudio"
-        else:
-            LOGGER.debug(_("Could not determine an itag value "
-                           "from the configuration"))
-            return "hls-2265" + config.values["videocodec"] + \
-                   "+bestaudio"