Esempio n. 1
0
def test_fembed(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'Sorry 404 not found' in response.content or 'Sorry this file does not exist' in response.content:
                return False, 'Link Caido'
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 2
0
def test_tunepk(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            return True, response.content
        if response.status_code == 404:
            return False, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 3
0
def test_clipwatching(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'The file you were looking for could not be found' in response.content or '404 File not found!' in response.content:
                return False, 'Link Caido'
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 4
0
def test_okru(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'Video has not been found' in response.content or 'movieBlocked' in response.content:
                return False, 'Link Caido'
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 5
0
def test_mixdrop(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'WE ARE SORRY' in response.content or "We can't find the file you are looking for." in response.content:
                return False, 'Link Caido'
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 6
0
def test_thevideobee(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'File Not Found' in response.content or 'ile is no longer available as it expired or has been deleted.' in response.content:
                return False, 'Link Caido'
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 7
0
def test_gounlimited(url):
    response = conect.get_url(url, h=default_headers)
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            if 'Watch output mp4' in response.content or 'x3gnlvr6xn1y.html' in response.content or 'File Not Found' in response.content:
                return False, response.content
            return True, response.content
    return False, 'Imposible conectar con el server'
Esempio n. 8
0
def download_connector(local_connector, local_connectors, remote_connectors):
    response = conect.get_url(
        'https://fusionorg.net/connectors/index.php', m='post', p={'connector': local_connector})
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            data = response.content
            hash = hashlib.md5()
            hash.update(data)
            md5 = hash.hexdigest()
            if md5 == remote_connectors.get(local_connector, {'md5': ''}).get('md5', ''):
                connectors_path = os.path.join(addon_dir, 'base', 'servers')
                path_file = os.path.join(connectors_path, local_connector)
                if not local_connector.startswith('__') and local_connector.endswith('.py'):
                    open(path_file, 'w').write(data)
Esempio n. 9
0
def test_upstream(url):

    response = conect.get_url(url, h=default_headers)

    if response != 'Imposible conectar con el server':

        if response.status_code == 200:

            if 'File Not Found' in response.content or 'File is no longer available' in response.content:

                return False, 'Link Caido'

            return True, response.content

    return False, 'Imposible conectar con el server'
Esempio n. 10
0
def build_conectors_data_remote():
    connectors_path = os.path.join(addon_dir, 'base', 'servers')
    data_connectors_path = os.path.join(
        connectors_path, 'connectors_remote.json')
    data = 'Failed'
    response = conect.get_url(
        'https://fusionorg.net/connectors/index.php', m='post', p={'connectors': 'hola'})
    if response != 'Imposible conectar con el server':
        if response.status_code == 200:
            data = json.loads(response.content)
            data['conectores'] = len(data)
            data['actualizar'] = True
            data['time'] = time.time()
            write_file(data_connectors_path, json.dumps(data, indent=1))
    return data
Esempio n. 11
0
def test_uqload(url):

    response = conect.get_url(url, h=default_headers)

    if response != 'Imposible conectar con el server':

        if response.status_code == 200:

            if 'File Not Found' in response.content or 'File was deleted' in response.content:

                return False, 'Link Caido'

            return True, response.content

    return False, 'Imposible conectar con el server'
Esempio n. 12
0
def urlfembed(url):
    calidad = ''
    if 'calidad' in url:
        calidad = urlparse.parse_qs(url)['calidad'][0]
        url = url.split('&')[0]

    url_attr = urlparse.urlparse(url)
    id = url_attr[2].replace('.html',
                             '').replace('/f/',
                                         '').replace('/v/',
                                                     '').replace('/', '')
    url = '{}://feurl.com/v/{}'.format(url_attr[0], id)
    valid, data = test_fembed(url)
    sources = []
    finalurlfembed = ''
    if valid:
        default_headers['Origin'] = 'https://feurl.com'
        default_headers['Referer'] = url
        url = '{}://feurl.com/api/source/{}'.format(url_attr[0], id)
        response = conect.get_url(url,
                                  m='post',
                                  h=default_headers,
                                  p={
                                      'r': '',
                                      'd': 'feurl.com'
                                  })
        try:
            for item in response.json()['data']:
                if calidad == item['label']:
                    finalurlfembed = item['file']
            if finalurlfembed == '':
                finalurlfembed = item['file']
        except:
            return False, 'Fallo el conector Fembed'
        header_test = {
            'user-agent':
            'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'
        }
        header_test = '|' + urllib.urlencode(header_test)

        return True, finalurlfembed + header_test

    return False, ''
Esempio n. 13
0
def calidadesfembed(url):
    url_attr = urlparse.urlparse(url)
    id = url_attr[2].replace('.html',
                             '').replace('/f/',
                                         '').replace('/v/',
                                                     '').replace('/', '')
    url = '{}://feurl.com/f/{}'.format(url_attr[0], id)
    valid, data = test_fembed(url)
    calidades = 'dead'
    sources = []

    if valid:
        calidades = []
        default_headers['Origin'] = 'https://feurl.com'
        default_headers['Referer'] = url
        url = '{}://feurl.com/api/source/{}'.format(url_attr[0], id)
        response = conect.get_url(url, m='post', h=default_headers)
        try:
            for item in response.json()['data']:
                calidades += [item['label']]
        except:
            pass

    return calidades