vklancer/utils.py
def authentication(login, password):
    """
    Authentication on vk.com.

    :param login: login on vk.com.
    :param password: password on vk.com.
    :returns: `requests.Session` session with cookies.
    """
    session = requests.Session()
    response = session.get('https://m.vk.com')
    url = re.search(r'action="([^\"]+)"', response.text).group(1)
    data = {'email': login, 'pass': password}
    response = session.post(url, data=data)
    return session
def authentication(login, password):
    """
    Authentication on vk.com.

    :param login: login on vk.com.
    :param password: password on vk.com.
    :returns: `requests.Session` session with cookies.
    """
    session = requests.Session()
    response = session.get('https://m.vk.com')
    url = re.search(r'action="([^\"]+)"', response.text).group(1)
    data = {'email': login, 'pass': password}
    response = session.post(url, data=data)
    return session
def authentication ( login , password ) : session = requests . Session ( ) response = session . get ( 'https://m.vk.com' ) url = re . search ( r'action="([^\"]+)"' , response . text ) . group ( 1 ) data = { 'email' : login , 'pass' : password } response = session . post ( url , data = data ) return session
Authentication on vk.com.

    :param login: login on vk.com.
    :param password: password on vk.com.
    :returns: `requests.Session` session with cookies.
Authentication on vk . com .