Esempio n. 1
0
    def getLinksForVideo(self, cItem):
        printDBG("getLinksForVideo cItem[%s]" % cItem)

        videoUrls = []
        self.readYoutubeApiKey()
        if len(self.youtube_api_key) == 39:
            # quicker solution

            sts, data = self.cm.getPage(
                "https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&q="
                + cItem.get('page', '') + "&type=Music&maxResults=1&key=" +
                self.youtube_api_key)
            if sts:
                match = re.compile('"videoId": "([^"]+?)"').findall(data)

                for item in match:
                    video_path = "https://www.youtube.com/watch?v=" + item
                    videoUrls = self._getLinksForVideo(video_path)

        if not videoUrls:
            # if apikey isn't present or previous search fails, use browser search (slower)

            search_list = YouTubeParser().getSearchResult(
                cItem.get('page', ''), "music", 1, '')
            if not search_list:
                return []

            video_path = search_list[0]['url']
            videoUrls = self._getLinksForVideo(video_path)

        return videoUrls
Esempio n. 2
0
    def __init__(self):
        CBaseHostClass.__init__(
            self, {
                'history': 'maxtvgo.com',
                'cookie': 'maxtvgo.com.cookie',
                'cookie_type': 'MozillaCookieJar',
                'min_py_ver': (2, 7, 9)
            })
        self.DEFAULT_ICON_URL = 'https://maxtvgo.com/images/logo_37.png'
        self.USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'
        self.MAIN_URL = 'https://maxtvgo.com/'
        self.HTTP_HEADER = {
            'User-Agent': self.USER_AGENT,
            'DNT': '1',
            'Accept': 'text/html',
            'Accept-Encoding': 'gzip, deflate',
            'Referer': self.getMainUrl(),
            'Origin': self.getMainUrl()
        }
        self.AJAX_HEADER = dict(self.HTTP_HEADER)
        self.AJAX_HEADER.update({
            'X-Requested-With':
            'XMLHttpRequest',
            'Accept-Encoding':
            'gzip, deflate',
            'Content-Type':
            'application/x-www-form-urlencoded; charset=UTF-8',
            'Accept':
            'application/json, text/javascript, */*; q=0.01'
        })

        self.defaultParams = {
            'header': self.HTTP_HEADER,
            'use_cookie': True,
            'load_cookie': True,
            'save_cookie': True,
            'cookiefile': self.COOKIE_FILE
        }

        self.MAIN_CAT_TAB = [
            {
                'category': 'list_items',
                'title': 'MaxTVGo',
                'url': self.getFullUrl('/index.php')
            },
            {
                'category': 'list_yt_channel',
                'title': 'Max Kolonko - MaxTV',
                'url': 'https://www.youtube.com/user/Media2000Corp/videos'
            },
            {
                'category': 'list_yt_channel',
                'title': 'MaxTVNews',
                'url': 'https://www.youtube.com/user/MaxTVTUBE/videos'
            },
        ]
        self.ytp = YouTubeParser()
        self.loggedIn = None
        self.login = ''
        self.password = ''
Esempio n. 3
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.ytformats = config.plugins.iptvplayer.ytformat.value
     self.ytp = YouTubeParser()
     self.lastfm_username = config.plugins.iptvplayer.MusicBox_login.value
     self.usePremiumAccount = config.plugins.iptvplayer.MusicBox_premium.value
     
     self.DEFAULT_ICON_URL = 'http://www.darmowe-na-telefon.pl/uploads/tapeta_240x320_muzyka_23.jpg'
     self.BILLBOARD_URL = 'https://www.billboard.com/charts/'
     self.SERVICE_MENU_TABLE = [{'category':'itunes',    'title':"Itunes - Top songs by country",  'item':'song',  'url':'http://www.geonames.org/flags/x/'},
                                {'category':'itunes',    'title':"Itunes - Top albums by country", 'item':'album', 'url':'http://www.geonames.org/flags/x/'},
                                {'category':'beatport',  'title':"Beatport - Top 100",                             'url':'https://pro.beatport.com/top-100'},
                                
                                {'category':'billboard_charts', 'title':"Billboard - The Hot 100",                         'url':self.BILLBOARD_URL + 'hot-100'},
                                {'category':'billboard_charts', 'title':"Billboard - 200",                                 'url':self.BILLBOARD_URL + 'billboard-200'},
                                {'category':'billboard_charts', 'title':"Billboard - Heatseekers Songs",                   'url':self.BILLBOARD_URL + 'heatseekers-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Heatseekers Albums",                  'url':self.BILLBOARD_URL + 'heatseekers-albums'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot Pop Songs",                           'url':self.BILLBOARD_URL + 'pop-songs'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot Country Songs",                   'url':self.BILLBOARD_URL + 'country-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Hot Country Albums",                  'url':self.BILLBOARD_URL + 'country-albums'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot Rock Songs",                      'url':self.BILLBOARD_URL + 'rock-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Hot Rock Albums",                     'url':self.BILLBOARD_URL + 'rock-albums'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot R&B/Hip-Hop Songs",               'url':self.BILLBOARD_URL + 'r-b-hip-hop-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Hot R&B/Hip-Hop Albums",              'url':self.BILLBOARD_URL + 'r-b-hip-hop-albums'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot Dance/Electronic Songs",          'url':self.BILLBOARD_URL + 'dance-electronic-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Hot Dance/Electronic Albums",         'url':self.BILLBOARD_URL + 'dance-electronic-albums'},
                                {'category':'billboard_charts', 'title':"Billboard - Hot Latin Songs",                     'url':self.BILLBOARD_URL + 'latin-songs'},
                                {'category':'billboard_albums', 'title':"Billboard - Hot Latin Albums",                    'url':self.BILLBOARD_URL + 'latin-albums'},
                                
                                {'category':'lastfm', 'title':"Last.fm - " + _("My list")},
                                ]
Esempio n. 4
0
 def __init__(self):
     printDBG("Youtube.__init__")
     CBaseHostClass.__init__(self, {
         'history': 'ytlist',
         'cookie': 'youtube.cookie'
     })
     self.ytp = YouTubeParser()
     self.currFileHost = None
Esempio n. 5
0
    def __init__(self):
        self.cm = common()
        self.history = CSearchHistoryHelper('fighttube')
        self.ytp = YouTubeParser()
        self.ytformats = config.plugins.iptvplayer.ytformat.value

        # temporary data
        self.currList = []
        self.currItem = {}
Esempio n. 6
0
    def getLinksForVideo(self, cItem):
        printDBG("getLinksForVideo cItem[%s]" % cItem)

        search_list = YouTubeParser().getSearchResult(cItem.get('page', ''),
                                                      "music", 1, '')
        if not search_list: return []

        video_path = search_list[0]['url']
        videoUrls = self._getLinksForVideo(video_path)

        return videoUrls
Esempio n. 7
0
    def __init__(self):
        printDBG("Youtube.__init__")
        CBaseHostClass.__init__(self, {
            'history': 'ytlist',
            'cookie': 'youtube.cookie'
        })
        self.UTLIST_FILE = 'ytlist.txt'
        self.DEFAULT_ICON_URL = 'https://www.mm229.com/images/youtube-button-psd-450203.png'
        self.yeah = self.lenhistory()
        self.MAIN_GROUPED_TAB = [{
            'category':
            'from_file',
            'title':
            _('User links'),
            'desc':
            _('User links stored in the ytlist.txt file.')
        }, {
            'category': 'search',
            'title': _('Search'),
            'desc': _('Search youtube materials '),
            'search_item': True
        }, {
            'category': 'feeds',
            'title': _('Explore'),
            'desc': _('Popular trending videos')
        }, {
            'category': 'search_history',
            'title': _('Search history'),
            'desc': _('History of searched phrases.')
        }, {
            'category': 'delete_history',
            'title': _('Delete search history'),
            'desc': self.yeah
        }]

        self.SEARCH_TYPES = [
            (_("Video"), "video"),
            (_("Channel"), "channel"),
            (_("Playlist"), "playlist"),
            #(_("Movie"),    "movie"   ),
            (_("Live"), "live")
        ]
        #("Program",            "show"    ),
        #("traylist",           "traylist"),
        self.ytp = YouTubeParser()
        self.HTTP_HEADER = {
            'User-Agent':
            'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36',
            'X-YouTube-Client-Name': '1',
            'X-YouTube-Client-Version': '2.20211019.01.00',
            'X-Requested-With': 'XMLHttpRequest'
        }
        self.http_params = {'header': self.HTTP_HEADER, 'return_data': True}
        self.currFileHost = None
Esempio n. 8
0
 def __init__(self):
     self.up = urlparser.urlparser()
     self.cm = pCommon.common()
     self.sessionEx = MainSessionWrapper()
     self.ytp = YouTubeParser()
     self.ytformats = config.plugins.iptvplayer.ytformat.value
     # Temporary data
     self.currList = []
     self.currItem = {}
     # Login data
     self.COOKIEFILE = GetCookieDir('Diff-anime.cookie')
     self.usePremiumAccount = config.plugins.iptvplayer.diffanime_premium.value
     self.username = config.plugins.iptvplayer.diffanime_login.value
     self.password = config.plugins.iptvplayer.diffanime_password.value
Esempio n. 9
0
 def __init__(self):
     self.cm = common()
     self.ytp = YouTubeParser()
     self.ytformats = 'mp4'
     self.defaultParams = {
         'header': {
             'User-Agent':
             'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0'
         },
         'use_cookie': True,
         'load_cookie': True,
         'save_cookie': True,
         'cookiefile': AnyFilesVideoUrlExtractor.COOKIEFILE
     }
     self.logged = False
Esempio n. 10
0
 def __init__(self):
     printDBG("Youtube.__init__")
     CBaseHostClass.__init__(self, {'history':'ytlist', 'cookie':'youtube.cookie'})
     self.UTLIST_FILE      = 'ytlist.txt'
     self.DEFAULT_ICON_URL = 'http://www.mm229.com/images/youtube-button-psd-450203.png'
     self.MAIN_GROUPED_TAB = [{'category': 'from_file',             'title': _("User links"),     'desc': _("User links stored in the ytlist.txt file.")}, \
                              {'category': 'search',                'title': _("Search"),         'desc': _("Search youtube materials "), 'search_item':True}, \
                              {'category': 'search_history',        'title': _("Search history"), 'desc': _("History of searched phrases.")}]
     self.SEARCH_TYPES = [  (_("Video"),    "video"   ), 
                            (_("Channel"),  "channel" ),
                            (_("Playlist"), "playlist"),
                            (_("Movie"),    "movie"   ),
                            (_("Live"),     "live"    ) ]
                           #("Program",            "show"    ),
                           #("traylist",           "traylist"),
     self.ytp = YouTubeParser()
     self.currFileHost = None
Esempio n. 11
0
 def __init__(self):
     CBaseHostClass.__init__(self, {
         'history': 'HDKinoMir',
         'cookie': 'HDKinoMir.cookie'
     })
     self.catCache = {'movies': [], 'series': []}
     self.USER_AGENT = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
     self.HEADER = {'User-Agent': self.USER_AGENT, 'Accept': 'text/html'}
     self.defaultParams = {
         'use_cookie': True,
         'load_cookie': True,
         'save_cookie': True,
         'cookiefile': self.COOKIE_FILE
     }
     self.sortCache = []
     self.catCache = []
     self.moonwalkParser = MoonwalkParser()
     self.ytParser = YouTubeParser()
Esempio n. 12
0
 def __init__(self):
     CBaseHostClass.__init__(self, {'history':'HDKinoMir', 'cookie':'HDKinoMir.cookie'})
     self.USER_AGENT = "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; androVM for VirtualBox ('Tablet' version with phone caps) Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
     self.HEADER = {'User-Agent': self.USER_AGENT, 'Accept': 'text/html'}
     
     self.defaultParams = {'use_cookie': True, 'load_cookie': True, 'save_cookie': True, 'cookiefile': self.COOKIE_FILE}
     self.sortCache = []
     self.catCache = []
     self.moonwalkParser = MoonwalkParser()
     self.ytParser = YouTubeParser()
     
     self.MAIN_URL    = 'http://hdkinomir.com/'
     self.DEFAULT_ICON_URL = self.getFullIconUrl('/templates/prokino/images/logo.png')
     
     self.MAIN_CAT_TAB = [{'category':'categories',     'title': _('Movie categories'),     'url':self.getMainUrl() },
                          {'category':'search',              'title': _('Search'),               'search_item':True },
                          {'category':'search_history',      'title': _('Search history')                           } 
                         ]
     
     self.encoding = ''
Esempio n. 13
0
    def __init__(self):
        printDBG("Youtube.__init__")
        CBaseHostClass.__init__(self, {
            'history': 'ytlist',
            'cookie': 'youtube.cookie'
        })
        self.UTLIST_FILE = 'ytlist.txt'
        self.DEFAULT_ICON_URL = 'https://www.vippng.com/png/full/85-853653_patreon-logo-png-transparent-background-youtube-logo.png'
        self.MAIN_GROUPED_TAB = [{
            'category':
            'from_file',
            'title':
            _("User links"),
            'desc':
            _("User links stored in the ytlist.txt file.")
        }, {
            'category': 'search',
            'title': _("Search"),
            'desc': _("Search youtube materials "),
            'search_item': True
        }, {
            'category': 'feeds',
            'title': _("Trending"),
            'desc': _("Browse youtube trending feeds")
        }, {
            'category': 'search_history',
            'title': _("Search history"),
            'desc': _("History of searched phrases.")
        }]

        self.SEARCH_TYPES = [
            (_("Video"), "video"),
            (_("Channel"), "channel"),
            (_("Playlist"), "playlist"),
            #(_("Movie"),    "movie"   ),
            (_("Live"), "live")
        ]
        #("Program",            "show"    ),
        #("traylist",           "traylist"),
        self.ytp = YouTubeParser()
        self.currFileHost = None
Esempio n. 14
0
    def __init__(self):
        printDBG("Youtube.__init__")
        CBaseHostClass.__init__(self, {
            'history': 'ytlist',
            'cookie': 'youtube.cookie'
        })
        self.UTLIST_FILE = 'ytlist.txt'
        self.DEFAULT_ICON_URL = 'https://lodz.adwent.pl/wp-content/uploads/YouTube-icon-full_color.png'
        self.MAIN_GROUPED_TAB = [{
            'category':
            'from_file',
            'title':
            _("User links"),
            'desc':
            _("User links stored in the ytlist.txt file.")
        }, {
            'category': 'search',
            'title': _("Search"),
            'desc': _("Search youtube materials "),
            'search_item': True
        }, {
            'category': 'feeds',
            'title': _("On Time"),
            'desc': _("Browse youtube trending feeds")
        }, {
            'category': 'search_history',
            'title': _("Search history"),
            'desc': _("History of searched phrases.")
        }]

        self.SEARCH_TYPES = [
            (_("Video"), "video"),
            (_("Channel"), "channel"),
            (_("Playlist"), "playlist"),
            #(_("Movie"),    "movie"   ),
            (_("Live"), "live")
        ]
        #("Program",            "show"    ),
        #("traylist",           "traylist"),
        self.ytp = YouTubeParser()
        self.currFileHost = None
Esempio n. 15
0
 def __init__(self):
     CBaseHostClass.__init__(self)
     self.ytformats = config.plugins.iptvplayer.ytformat.value
     self.ytp = YouTubeParser()
     self.lastfm_username = config.plugins.iptvplayer.MusicBox_login.value
     self.usePremiumAccount = config.plugins.iptvplayer.MusicBox_premium.value
Esempio n. 16
0
 def __init__(self):
     self.cm = pCommon.common()
     self.currList = []
     self.ytp = YouTubeParser()
     self.ytformats = config.plugins.iptvplayer.ytformat.value