Esempio n. 1
0
def test_soundcloud():
    info = extract(parse('https://soundcloud.com/danielpatterson')[0])

    assert info.get('uid') == '78365'
    assert info.get('username') == 'danielpatterson'
    assert info.get('name') == 'Daniel Patterson'
    assert info.get('following_count') == '23'
    assert info.get('follower_count') == '36'
    assert info.get('is_verified') == 'False'
    assert info.get(
        'image'
    ) == 'https://i1.sndcdn.com/avatars-000222811304-x9f1ao-large.jpg'
    assert info.get('location') == 'Baton Rouge'
    assert info.get('country_code') == 'US'
    assert info.get('created_at') == '2009-02-27T16:08:17Z'
Esempio n. 2
0
def test_linktree():
    info = extract(parse('https://linktr.ee/annetlovart')[0])

    assert info.get('id') == '5420275'
    assert info.get('username') == 'annetlovart'
    assert info.get(
        'image'
    ) == 'https://d1fdloi71mui9q.cloudfront.net/MidfykWeQemDO5YVdRDv_35849b5fb49c69271d284ade7ffef659'
    assert info.get('is_active') == 'True'
    assert info.get('is_verified') == 'True'
    assert info.get('is_email_verified') == 'True'
    assert info.get('tier') == 'free'
    assert info.get(
        'links'
    ) == "['https://uk.wikipedia.org/wiki/Annet_Lovart', 'https://www.patreon.com/annetlovart', 'https://creativemarket.com/annet_lovart/4945530-Trendy-Floral-Pattern', 'https://www.behance.net/gallery/96717659/Maya-flowers', 'https://www.facebook.com/annetlovart', 'https://youtu.be/mWU_Lyb9kw4', 'https://instagram.com/annet_lovart', 'https://www.pinterest.com/annet_lovart/one-stroke-tutorial-annet_lovart/']"
Esempio n. 3
0
def test_twitch():
    info = extract(parse('https://m.twitch.tv/johnwolfe/profile')[0])

    assert info.get('id') == '36536868'
    assert info.get('username') == 'johnwolfe'
    assert info.get('bio') == 'Playing horror games all the time for charity.'
    assert info.get('fullname') == 'JohnWolfe'
    assert info.get(
        'image'
    ) == 'https://static-cdn.jtvnw.net/jtv_user_pictures/johnwolfe-profile_image-61f8e374d34a8bbd-300x300.png'
    assert info.get(
        'image_bg'
    ) == 'https://static-cdn.jtvnw.net/jtv_user_pictures/9d88705b5a305a7e-profile_banner-480.jpeg'
    assert 'views_count' in info
    assert 'likes_count' in info
Esempio n. 4
0
def test_pinterest_board():
    info = extract(
        parse('https://www.pinterest.ru/gergelysndorszendrenyi/garden-ideas/')
        [0])

    assert info.get('pinterest_id') == '730849983187756836'
    assert info.get('pinterest_username') == 'gergelysndorszendrenyi'
    assert info.get('fullname') == 'Gergely Sándor-Szendrenyi'
    assert info.get('type') == 'user'
    assert info.get(
        'image') == 'https://s.pinimg.com/images/user/default_280.png'
    assert info.get('country') == 'HU'
    assert info.get('is_indexed') == 'True'
    assert info.get('is_partner') == 'False'
    assert info.get('is_tastemaker') == 'False'
    assert info.get('locale') == 'hu-HU'
Esempio n. 5
0
def test_500px():
    info = extract(
        parse(
            'https://api.500px.com/graphql?operationName=ProfileRendererQuery&variables=%7B%22username%22%3A%22the-maksimov%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22105058632482dd2786fd5775745908dc928f537b28e28356b076522757d65c19%22%7D%7D'
        )[0])

    assert info.get('uid') == 'dXJpOm5vZGU6VXNlcjoyMzg5Ng=='
    assert info.get('legacy_id') == '23896'
    assert info.get('username') == 'The-Maksimov'
    assert info.get('name') == 'Maxim Maximov'
    assert info.get('qq_uid') == None
    assert info.get('fb_uid') == None
    assert info.get('instagram_username') == 'the.maksimov'
    assert info.get('twitter_username') == 'The_Maksimov'
    assert info.get('website') == 'www.instagram.com/the.maksimov'
    assert info.get('facebook_link') == 'www.facebook.com/the.maksimov'
Esempio n. 6
0
def test_yandex_zen_user_profile():
    info = extract(
        parse('https://zen.yandex.ru/user/uyawkukxyf60ud6hjrxr2rq130')[0])

    assert info.get('yandex_public_id') == 'uyawkukxyf60ud6hjrxr2rq130'
    assert info.get('fullname') == 'Нина Кравченко'
    assert info.get(
        'image'
    ) == 'https://avatars.mds.yandex.net/get-yapic/51169/DKXVQdtL3tZ5cayBXnnicLaKcE-1/islands-200'
    assert info.get('messenger_guid') == 'e4615300-548b-9a46-73cf-527d47fe57ed'
    assert info.get('links') == '[]'
    assert info.get('type') == 'user'
    assert int(info.get('comments_count')) > 20
    assert info.get('status') == 'active'
    assert 'following_count' in info
    assert 'follower_count' in info
Esempio n. 7
0
def test_yandex_music_user_profile():
    headers = {'referer': 'https://music.yandex.ru/users/pritisk/playlists'}
    info = extract(
        parse('https://music.yandex.ru/handlers/library.jsx?owner=pritisk',
              headers=headers)[0])

    assert info.get('yandex_uid') == '16480689'
    assert info.get('username') == 'pritisk'
    assert info.get('name') == 'Юрий Притиск'
    assert info.get(
        'image'
    ) == 'https://avatars.mds.yandex.net/get-yapic/29310/gK74BTyv8LrLRT0mQFIR2xcWv8-1/islands-200'
    assert info.get('links') == '[]'
    assert info.get('is_verified') == 'False'
    assert info.get('liked_albums') == '0'
    assert info.get('liked_artists') == '0'
Esempio n. 8
0
def test_500px():
    info = extract(
        parse(
            'https://api.500px.com/graphql?operationName=ProfileRendererQuery&variables=%7B%22username%22%3A%22the-maksimov%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%224d02ff5c13927a3ac73b3eef306490508bc765956940c31051468cf30402a503%22%7D%7D'
        )[0])

    assert info.get('uid') == 'dXJpOm5vZGU6VXNlcjoyMzg5Ng=='
    assert info.get('legacy_id') == '23896'
    assert info.get('username') == 'The-Maksimov'
    assert info.get('name') == 'Maxim Maximov'
    assert info.get('qq_uid') == None
    assert info.get('fb_uid') == None
    assert info.get('instagram_username') == 'the.maksimov'
    assert info.get('twitter_username') == 'The_Maksimov'
    assert info.get('website') == 'vk.com/id156603747'
    assert info.get('facebook_link') == 'facebook.com/the.maksimov'
Esempio n. 9
0
def test_yandex_collections_api():
    info = extract(parse('http://yandex.uz/collections/api/users/gebial')[0])

    assert info.get('yandex_public_id') == '20vpvmmwpnwyb0dpbnjvy3k14c'
    assert info.get('fullname') == 'yellow_lolo'
    assert info.get(
        'image'
    ) == 'https://avatars.mds.yandex.net/get-yapic/62162/enc-325ec489adfdc84e00cb76315a5e214dc95d51408754cd21321958be4b59647a/islands-200'
    assert info.get('gender') == 'm'
    assert info.get('likes') == '0'
    assert info.get('cards') == '0'
    assert info.get('boards') == '0'
    assert info.get('is_passport') == 'True'
    assert info.get('is_restricted') == 'False'
    assert info.get('is_forbid') == 'False'
    assert info.get('is_km') == 'False'
    assert info.get('is_business') == 'False'
Esempio n. 10
0
def test_reddit():
    info = extract(
        parse('https://www.reddit.com/user/Diascamara/', timeout=10)[0])

    assert info.get('reddit_id') == 't5_a8vxj'
    assert info.get('reddit_username') == 'Diascamara'
    assert info.get('fullname') == 'Diascamara'
    assert info.get('is_employee') == 'False'
    assert info.get('is_nsfw') == 'False'
    assert info.get('is_mod') == 'True'
    assert info.get('is_following') == 'True'
    assert info.get('has_user_profile') == 'True'
    assert info.get('created_at') in ('2018-01-06 04:22:05',
                                      '2018-01-06 01:22:05')
    assert info.get('hide_from_robots') == 'True'
    assert int(info.get('total_karma')) > int(30000)
    assert int(info.get('post_karma')) > int(7000)
Esempio n. 11
0
def test_jsfiddle():
    info = extract(parse('https://jsfiddle.net/user/john')[0])

    assert info.get('fullname') == 'John Michel'
    assert info.get('company') == 'Philadelphia, PA'
    assert info.get(
        'links'
    ) == "['https://twitter.com/jhnmchl', 'https://github.com/johnmichel']"
    assert info.get(
        'image'
    ) == 'https://www.gravatar.com/avatar/eca9f115bdefbbdf0c0381a58bcaf601?s=80'
    assert info.get(
        'gravatar_url'
    ) == 'https://gravatar.com/eca9f115bdefbbdf0c0381a58bcaf601'
    assert info.get('gravatar_username') == 'cowbird'
    assert info.get(
        'gravatar_email_hash') == 'eca9f115bdefbbdf0c0381a58bcaf601'
Esempio n. 12
0
def test_flickr():
    info = extract(
        parse('https://www.flickr.com/photos/alexaimephotography2020/')[0])

    assert info.get('flickr_id') == '187482857@N04'
    assert info.get('flickr_username') == 'alexaimephotography2020'
    assert info.get('flickr_nickname') == 'aaphotography2020'
    assert info.get('fullname') == 'alexaim%E9 photography'
    assert info.get(
        'image'
    ) == 'https://farm66.staticflickr.com/65535/buddyicons/187482857@N04_r.jpg?1584445364#187482857@N04'
    assert int(info.get('photo_count')) > 140
    assert int(info.get('follower_count')) > 180
    assert int(info.get('following_count')) > 70
    assert info.get('created_at') in ('2020-03-17 07:18:59',
                                      '2020-03-17 04:18:59')
    assert info.get('is_pro') == 'False'
    assert info.get('is_deleted') == 'False'
Esempio n. 13
0
def test_xakep():
    info = extract(parse('https://xakep.ru/author/dmbaturin/')[0])

    assert info.get('fullname') == 'Даниил Батурин'
    assert info.get(
        'image'
    ) == 'https://secure.gravatar.com/avatar/b1859c813547de1bba3c65bc4b1a217c?s=150&d=retro&r=g'
    assert info.get(
        'bio'
    ) == 'Координатор проекта VyOS (https://vyos.io), «языковед», функциональщик,  иногда сетевой администратор'
    assert info.get('links') == "['https://www.baturin.org']"
    assert info.get('joined_year') == '2018'
    assert info.get(
        'gravatar_url'
    ) == 'https://gravatar.com/b1859c813547de1bba3c65bc4b1a217c'
    assert info.get('gravatar_username') == 'dmbaturin'
    assert info.get(
        'gravatar_email_hash') == 'b1859c813547de1bba3c65bc4b1a217c'
Esempio n. 14
0
def test_uidme():
    info = extract(parse('http://uid.me/koshka', timeout=10)[0])

    assert info.get('username') == 'koshka'
    assert info.get(
        'image') == 'https://uid.me/img/avatar/w/z/n/medium_m38dkp68.jpg'
    assert info.get(
        'headline'
    ) == '..Но в глубине души моей тоска по крови, ночи, дикости горит (Гессе).'
    assert info.get(
        'bio'
    ) == 'Студентка ВНУ, факультет философии (4й курс). Ищу, жду, иду, пишу... Не слишком отличаюсь от большинства людей моего возраста.'
    assert info.get('contacts') == "['*****@*****.**']"
    assert info.get('email') == '*****@*****.**'
    assert info.get('phone') == '380669243144'
    assert info.get('skype') == 'Dariya Koshka'
    assert info.get('location') == 'Луганск'
    assert info.get('links') == "['http://www.proza.ru/avtor/dahakot']"
Esempio n. 15
0
def test_disqus_api():
    info = extract(
        parse(
            'https://disqus.com/api/3.0/users/details?user=username%3Amargaret&attach=userFlaggedUser&api_key=E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F'
        )[0])

    assert info.get('id') == '1593'
    assert info.get('fullname') == 'margaret'
    assert info.get('reputation') == '1.231755'
    assert info.get('reputation_label') == 'Average'
    assert info.get('following_count') == '0'
    assert info.get('follower_count') == '0'
    assert info.get('is_power_contributor') == 'False'
    assert info.get('is_anonymous') == 'False'
    assert info.get('created_at') == '2007-11-06T01:14:28'
    assert info.get('likes_count') == '0'
    assert info.get('forums_count') == '0'
    assert info.get(
        'image') == 'https://disqus.com/api/users/avatars/margaret.jpg'
Esempio n. 16
0
def test_tiktok():
    info = extract(parse('https://www.tiktok.com/@red')[0])

    assert info.get('tiktok_id') == '6667977707978850310'
    assert info.get('tiktok_username') == 'red'
    assert info.get('fullname') == '(RED)'
    assert info.get(
        'bio'
    ) == 'Whether AIDS or COVID-19, we can’t beat pandemics without strong health systems.'
    assert 'tiktokcdn.com' in info.get('image')
    assert info.get('is_verified') == 'True'
    assert info.get('is_secret') == 'False'
    assert info.get(
        'sec_uid'
    ) == 'MS4wLjABAAAAVAp3JR-xHP7UnaDt4S9T9eyPqRDwgGiBRnzdZRm63jIGWy5s39a027nKJlu_UjOZ'
    assert int(info.get('following_count')) > 300
    assert int(info.get('follower_count')) > 36000
    assert int(info.get('heart_count')) > 275900
    assert int(info.get('video_count')) > 50
    assert info.get('digg_count') == '0'
Esempio n. 17
0
def test_pinterest_profile():
    info = extract(
        parse('https://www.pinterest.ru/gergelysndorszendrenyi/boards/')[0])

    assert info.get('pinterest_id') == None
    assert info.get('pinterest_username') == 'gergelysndorszendrenyi'
    assert info.get('fullname') == 'Gergely Sándor-Szendrenyi'
    assert info.get('type') == None
    assert info.get(
        'image') == 'https://s.pinimg.com/images/user/default_280.png'
    assert info.get('country') == 'HU'
    assert info.get('is_indexed') == 'True'
    assert info.get('is_partner') == None
    assert info.get('is_tastemaker') == None
    assert info.get('is_indexed') == 'True'
    assert info.get('is_website_verified') == 'False'
    assert info.get('follower_count') == '2'
    assert info.get('following_count') == '16'
    assert info.get('board_count') == '11'
    assert int(info.get('pin_count')) > 100
Esempio n. 18
0
def test_yandex_market():
    info = extract(
        parse(
            'https://market.yandex.ru/user/z16yy5a9ae7uh030t5bgpkgyqg/reviews')
        [0])

    assert info.get('username') == 'katerina.jaryschckina'
    assert info.get('yandex_uid') == '207757917'
    assert info.get('yandex_public_id') == 'z16yy5a9ae7uh030t5bgpkgyqg'
    assert info.get('fullname') == 'Екатерина Ярышкинa'
    assert info.get(
        'image'
    ) == 'https://avatars.mds.yandex.net/get-yapic/15298/enc-b44c03912bc49d1ba01345b8a2a4facbf24874f4dc922b4eb50b455107676f1a/islands-200'
    assert info.get('reviews_count') == '2'
    assert info.get('is_deleted') == 'False'
    assert info.get('is_hidden_name') == 'True'
    assert info.get('is_verified') == 'False'
    assert info.get(
        'linked_social'
    ) == "[{'type': 'vkontakte', 'uid': '137002953', 'username': None, 'profile_id': 12075972}]"
    assert info.get('links') == "['https://vk.com/id137002953']"
Esempio n. 19
0
def test_tiktok():
    headers = {
        'user-agent':
        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36'
    }
    info = extract(parse('https://www.tiktok.com/@red', headers=headers)[0])

    assert info.get('tiktok_id') == '6667977707978850310'
    assert info.get('tiktok_username') == 'red'
    assert info.get('fullname') == '(RED)'
    assert 'bio' in info
    assert 'tiktokcdn.com' in info.get('image')
    assert info.get('is_verified') == 'True'
    assert info.get('is_secret') == 'False'
    assert info.get(
        'sec_uid'
    ) == 'MS4wLjABAAAAVAp3JR-xHP7UnaDt4S9T9eyPqRDwgGiBRnzdZRm63jIGWy5s39a027nKJlu_UjOZ'
    assert int(info.get('following_count')) > 300
    assert int(info.get('follower_count')) > 36000
    assert int(info.get('heart_count')) > 275900
    assert int(info.get('video_count')) > 50
    assert info.get('digg_count') == '0'
Esempio n. 20
0
def test_d3():
    info = extract(parse('https://d3.ru/user/deer00hunter')[0])

    assert info.get('uid') == '75504'
Esempio n. 21
0
def test_yandex_disk():
    info = extract(parse('https://yadi.sk/d/xRJFp3s2QWYv8')[0])

    assert info.get('yandex_uid') == '225171618'
    assert info.get('name') == 'Trapl  Zdenek'
Esempio n. 22
0
def test_telegram():
    info = extract(parse('https://t.me/buzovacoin')[0])

    assert info.get('fullname') == 'Buzovacoin'
    assert info.get('about').startswith('ICO Ольги Бузовой - Платформа BUZAR')
Esempio n. 23
0
def test_bitbucket():
    info = extract(parse('https://bitbucket.org/arny/')[0])

    assert info.get('uid') == '57ad342a-ec8f-42cb-af05-98175b72b8db'
    assert info.get('username') == 'arny'
    assert info.get('created_at') == '2009-11-23T10:41:04.355755+00:00'
Esempio n. 24
0
def test_steam_hidden():
    info = extract(parse('https://steamcommunity.com/id/Elvoc/')[0])

    assert info.get('uid') == '76561197976127725'
    assert info.get('username') == 'Elvoc'
    assert info.get('nickname') == 'Elvoc'
Esempio n. 25
0
def test_gitlab_cookies():
    cookies = open('gitlab.test.cookies').read()
    info = extract(parse('https://gitlab.com/markglenfletcher', cookies)[0])

    assert info.get('uid') == '419655'
Esempio n. 26
0
def test_google_maps():
    info = extract(
        parse('https://www.google.com/maps/contrib/117503292148966883754')[0])

    assert info.get('contribution_level').startswith('Level 3 Local Guide')
    assert info.get('name') == 'Art NI'
Esempio n. 27
0
def test_youtube():
    info = extract(
        parse('https://www.youtube.com/channel/UCbeOQiPo5SjX8Q_IoSooBig')[0])

    assert info.get('gaia_id') == '117503292148966883754'
    assert info.get('name') == 'Art NI'
Esempio n. 28
0
def test_myspace():
    info = extract(parse('https://myspace.com/katelynryry')[0])

    assert info.get('uid') == '8158005'
    assert info.get('username') == 'katelynryry'
Esempio n. 29
0
def test_vcru():
    info = extract(parse('https://vc.ru/u/6587-pavel-stolyarov')[0])

    assert info.get('uid') == '6587'
    assert info.get('username') == '6587-pavel-stolyarov'
    assert info.get('name') == 'Павел Столяров'
Esempio n. 30
0
def test_blogger():
    info = extract(parse('https://b0ltay.blogspot.ru')[0])

    assert info.get('uid') == '10725121405978587846'
    assert info.get('blog_id') == '9057808199412143402'