예제 #1
0
파일: megahd.py 프로젝트: Bycacha/BYCACHA
def login():
    logger.info("channels.megahd login")

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://megahd.me/login/", headers=MAIN_HEADERS)
    #<form action="http://megahd.me/login2/" name="frmLogin" id="frmLogin" method="post" accept-charset="UTF-8"  onsubmit="hashLoginPassword(this, 'd3c3d7467c05a4058e9361996daeaed4');">
    cur_session_id = scrapertools.get_match(data,'onsubmit\="hashLoginPassword\(this, \'([a-z0-9]+)\'')
    logger.info("channels.megahd cur_session_id="+cur_session_id)

    # Calcula el hash del password
    LOGIN = config.get_setting("megahduser")
    PASSWORD = config.get_setting("megahdpassword")
    logger.info("channels.megahd LOGIN="******"channels.megahd PASSWORD="******"channels.megahd hash_passwrd="+hash_passwrd)

    # Hace el submit del login
    post = "user="******"&passwrd=&cookieneverexp=on&hash_passwrd="+hash_passwrd
    logger.info("channels.megahd post="+post)

    data = scrapertools.cache_page("http://megahd.me/login2/" , post=post, headers=MAIN_HEADERS)

    return True
예제 #2
0
def login():
    logger.info("channels.megahd login")

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://megahd.me/login/",
                                   headers=MAIN_HEADERS)
    #<form action="http://megahd.me/login2/" name="frmLogin" id="frmLogin" method="post" accept-charset="UTF-8"  onsubmit="hashLoginPassword(this, 'd3c3d7467c05a4058e9361996daeaed4');">
    cur_session_id = scrapertools.get_match(
        data, 'onsubmit\="hashLoginPassword\(this, \'([a-z0-9]+)\'')
    logger.info("channels.megahd cur_session_id=" + cur_session_id)

    # Calcula el hash del password
    LOGIN = config.get_setting("megahduser")
    PASSWORD = config.get_setting("megahdpassword")
    logger.info("channels.megahd LOGIN="******"channels.megahd PASSWORD="******"channels.megahd hash_passwrd=" + hash_passwrd)

    # Hace el submit del login
    post = "user="******"&passwrd=&cookieneverexp=on&hash_passwrd=" + hash_passwrd
    logger.info("channels.megahd post=" + post)

    data = scrapertools.cache_page("http://megahd.me/login2/",
                                   post=post,
                                   headers=MAIN_HEADERS)

    return True
def login():

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://www.mocosoftx.com/foro/index.php")
    cur_session_id = scrapertools.get_match(
        data,
        'form action="[^"]+" method="post" accept-charset="ISO-8859-1" onsubmit="hashLoginPassword\(this, \'([a-z0-9]+)\'',
    )
    logger.info("cur_session_id=" + cur_session_id)

    # Calcula el hash del password
    LOGIN = config.get_setting("mocosoftxuser")
    PASSWORD = config.get_setting("mocosoftxpassword")
    logger.info("LOGIN="******"PASSWORD="******"hash_passwrd=" + hash_passwrd)

    # Hace el submit del login
    post = "user="******"&passwrd=&cookielength=-1&hash_passwrd=" + hash_passwrd
    logger.info("post=" + post)

    data = scrapertools.cache_page("http://mocosoftx.com/foro/login2/", post=post, headers=MAIN_HEADERS)

    return True
예제 #4
0
def login():

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://www.mocosoftx.com/foro/index.php")
    cur_session_id = scrapertools.get_match(
        data,
        'form action="[^"]+" method="post" accept-charset="ISO-8859-1" onsubmit="hashLoginPassword\(this, \'([a-z0-9]+)\''
    )
    logger.info("cur_session_id=" + cur_session_id)

    # Calcula el hash del password
    LOGIN = config.get_setting("mocosoftxuser")
    PASSWORD = config.get_setting("mocosoftxpassword")
    logger.info("LOGIN="******"PASSWORD="******"hash_passwrd=" + hash_passwrd)

    # Hace el submit del login
    post = "user="******"&passwrd=&cookielength=-1&hash_passwrd=" + hash_passwrd
    logger.info("post=" + post)

    data = scrapertools.cache_page("http://mocosoftx.com/foro/login2/",
                                   post=post,
                                   headers=MAIN_HEADERS)

    return True
def get_video_url(page_url,
                  premium=False,
                  user="",
                  password="",
                  video_password=""):
    logger.info("[videott.py] url=" + page_url)

    video_urls = []

    # URL del vídeo
    videoid = scrapertools.find_single_match(page_url,
                                             "video.tt/e/([A-Za-z0-9]+)")
    timestamp = str(random.randint(1000000000, 9999999999))
    hexastring = scrapertools.get_sha1(page_url) + scrapertools.get_sha1(
        page_url) + scrapertools.get_sha1(page_url) + scrapertools.get_sha1(
            page_url)
    hexastring = hexastring[:96]

    media_url = "http://gs.video.tt/s?v=" + videoid + "&r=1&t=" + timestamp + "&u=&c=" + hexastring + "&start=0"
    video_urls.append(["mp4 [videott]", media_url])

    for video_url in video_urls:
        logger.info("[videott.py] %s - %s" % (video_url[0], video_url[1]))

    return video_urls
예제 #6
0
def login():

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://mocosoftx.com/foro/login/")
    cur_session_id = scrapertools.get_match(
        data,
        'form action="[^"]+" name="frmLogin" id="frmLogin" method="post" accept-charset="ISO-8859-1"  onsubmit="hashLoginPassword\(this, \'([a-z0-9]+)\''
    )
    cur_session_id = "c95633073dc6afaa813d33b2bfeda520"
    logger.info("cur_session_id=" + cur_session_id)

    # Calcula el hash del password
    email = config.get_setting("mocosoftxuser")
    password = config.get_setting("mocosoftxpassword")
    logger.info("email=" + email)
    logger.info("password="******"hash_passwrd=" + hash_passwrd)

    # Hace el submit del email
    #post = "user="******"&passwrd=&cookieneverexp=on&hash_passwrd="+hash_passwrd
    post = urllib.urlencode({
        'user': email,
        "passwrd": password
    }) + "&cookieneverexp=on&hash_passwrd="
    logger.info("post=" + post)

    headers = []
    headers.append(["Host", "mocosoftx.com"])
    headers.append([
        "User-Agent",
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"
    ])
    headers.append([
        "Accept",
        "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
    ])
    headers.append(["Accept-Language", "es-ES,es;q=0.8,en;q=0.6,gl;q=0.4"])
    headers.append(["Accept-Encoding", "gzip, deflate"])
    headers.append(["Connection", "keep-alive"])
    headers.append(["Referer", "http://mocosoftx.com/foro/login/"])
    headers.append(["Origin", "http://mocosoftx.com"])
    headers.append(["Content-Type", "application/x-www-form-urlencoded"])
    headers.append(["Content-Length", str(len(post))])
    headers.append(["Cache-Control", "max-age=0"])
    headers.append(["Upgrade-Insecure-Requests", "1"])

    data = scrapertools.cache_page("http://mocosoftx.com/foro/login2/",
                                   post=post,
                                   headers=headers)
    logger.info("data=" + data)

    return True
예제 #7
0
def get_video_url( page_url , premium = False , user="" , password="", video_password="" ):
    logger.info("[videott.py] url="+page_url)

    video_urls = []

    # URL del vídeo
    videoid = scrapertools.find_single_match(page_url,"video.tt/e/([A-Za-z0-9]+)")
    timestamp=str(random.randint(1000000000,9999999999))
    hexastring = scrapertools.get_sha1(page_url) + scrapertools.get_sha1(page_url) + scrapertools.get_sha1(page_url) + scrapertools.get_sha1(page_url)
    hexastring = hexastring[:96]

    media_url = "http://gs.video.tt/s?v="+videoid+"&r=1&t="+timestamp+"&u=&c="+hexastring+"&start=0"
    video_urls.append( [ "mp4 [videott]",media_url ] )    

    for video_url in video_urls:
        logger.info("[videott.py] %s - %s" % (video_url[0],video_url[1]))

    return video_urls
예제 #8
0
def login():

    # Averigua el id de sesión
    data = scrapertools.cache_page("http://mocosoftx.com/foro/login/")
    cur_session_id = scrapertools.get_match(data,'form action="[^"]+" name="frmLogin" id="frmLogin" method="post" accept-charset="ISO-8859-1"  onsubmit="hashLoginPassword\(this, \'([a-z0-9]+)\'')
    cur_session_id="c95633073dc6afaa813d33b2bfeda520"
    logger.info("cur_session_id="+cur_session_id)

    # Calcula el hash del password
    email = config.get_setting("mocosoftxuser")
    password = config.get_setting("mocosoftxpassword")
    logger.info("email="+email)
    logger.info("password="******"hash_passwrd="+hash_passwrd)

    # Hace el submit del email
    #post = "user="******"&passwrd=&cookieneverexp=on&hash_passwrd="+hash_passwrd
    post =  urllib.urlencode({'user':email,"passwrd":password})+"&cookieneverexp=on&hash_passwrd="
    logger.info("post="+post)

    headers = []
    headers.append( ["Host","mocosoftx.com"] )
    headers.append( ["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"] )
    headers.append( ["Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"] )
    headers.append( ["Accept-Language","es-ES,es;q=0.8,en;q=0.6,gl;q=0.4"] )
    headers.append( ["Accept-Encoding","gzip, deflate"] )
    headers.append( ["Connection","keep-alive"] )
    headers.append( ["Referer","http://mocosoftx.com/foro/login/"] )
    headers.append( ["Origin","http://mocosoftx.com"] )
    headers.append( ["Content-Type","application/x-www-form-urlencoded"] )
    headers.append( ["Content-Length",str(len(post))] )
    headers.append( ["Cache-Control","max-age=0"] )
    headers.append( ["Upgrade-Insecure-Requests","1"] )

    data = scrapertools.cache_page("http://mocosoftx.com/foro/login2/", post=post, headers=headers)
    logger.info("data="+data)

    return True