Package: insta-checker
insta_checkerPython Instagram API checker / scrapper / wrapper 2021. Fast and asynchronously scrapes instagram profiles and posts, powered by aiohttp.My needs for one project included scraping likes, the number of subscribers and so on from Instagram. When I wrote this library, I've cheked out a huge bunch (about 30) of other scrapping libraries in Python or JavaScript. There was only one abandoned library, but it died after a month of use. Actually, I wrote my own library, which is this repository.Working with this library, you are expected:Fully works in 2021The fastest library for requests - aiohttpFully asynchronousBunch of try except, which, if anything goes wrong, will return the available dataAdequate informational messages and error messagesTimeoutsTypingInstallationpip install insta-checkerHere is PyPiUsageCreate instance of InstaChecker with keywords:cookie: Instagram cookie, you must take it after auth, to get requests' statuses ok (str)proxy: Proxy, if needed (str) ex:http://user:pass@some.proxy.comuser_agent: User-Agent header property (str)timeout: Sleep after request in seconds (float)max_async_requests_count: Maximum count of async requests (int)Show debug messages or not (bool)Example:checker=InstaChecker(cookie='cookie_string',proxy='http://user:pass@some.proxy.com',user_agent='user_agent_string',timeout=1,max_async_requests_count=10,debug=False)To use in default mode run function "run" in InstaChecker instance with params:urls: List of urlscheck: Bool, to check conf or notExample:urls_list=['https://www.instagram.com/antonnechaev990/']responses_task=awaitchecker.run(urls_list)# async funcforurlinurls_list:print(responses[url])To scrape one url run function "get_response" in InstaChecker instance with params:url: Url to scrapesession: aiohttp.ClientSession() or None to create a new oneExample:url='https://www.instagram.com/antonnechaev990/'data=awaitchecker.get_response(url)# async funcurl_data=data[url]To scrape data from source run function "source_to_data" in InstaChecker instance with params:response_result: Dict like in the exampleExample:source='Instagram HTML source string'response_result={'success':True,'data':source,'errors':[]}data=checker.source_to_data(response_result)# sync funcdata=data['data']Examplesrun.pyfrominsta_checkerimportInstaChecker,super_printimportasyncioasyncdefmain():cookie='ds_user_id=48743733271;mid=YQgRZwAAAAEPjPkWIONy9q0lPPdu;sessionid=48743733271%3AJRUhxoYZxBh4BX%3A6;ig_nrcb=1;ig_did=A446BA65-9920-462A-BAA8-F85FEAC0AB98;csrftoken=iD5MZwMnXZHgNzm8H5kACrNHKVBIvpDz;rur="CLN\05448743733271\0541659454776:01f7e7cbc38f962c9fbe9fe015e28ac99145941e231df3769a1682f8ce14b2a8ca254ddf";'checker=InstaChecker(cookie=cookie,timeout=1,)some_wrong_url='https://www.instagram.com/antonnechaev990123123213213132/'profile1_url='https://www.instagram.com/antonnechaev990/'post1_url='https://www.instagram.com/p/CQlptixpNQq/'urls_to_scrape=[some_wrong_url,profile1_url,post1_url]data=awaitchecker.run(urls_to_scrape)"""returns{'your-url': {'success': (bool),'data': (dict),'errors': (dict of strings)}}"""wrong_success=data[some_wrong_url]['success']print(f"{wrong_success= }")# f string with = is easy formatifnotwrong_success:print(f"{data[some_wrong_url]['errors']= }")profile1_success=data[profile1_url]['success']print(f"{profile1_success= }")ifprofile1_success:print(data[profile1_url])profile1_data=data[profile1_url]['data']print(f"{data[profile1_url]['type']= }")print(f"{profile1_data['id']= }")print(f"{profile1_data['avatar_url']= }")print(f"{profile1_data['followers']= }")print(f"{profile1_data['follows']= }")print(f"{profile1_data['media_count']= }")print(f"{profile1_data['recent_media'][0]['text']= }")print('')print('Printing all profile1 data:')super_print(profile1_data)post1_success=data[post1_url]['success']print(f"{post1_success= }")ifpost1_success:post1_data=data[post1_url]['data']print(f"{data[post1_url]['type']= }")print(f"{post1_data['id']= }")print(f"{post1_data['likes']= }")super_print(post1_data['owner'])print('')print('Printing all post1 data:')super_print(post1_data)asyncio.run(main())Output:InstaChecker-ConfigOKwrong_success=Falsedata[some_wrong_url]['errors']=["Can't fetch and parse the page. Error: 'Server disconnected'. On line 415"]profile1_success=Falsepost1_success=Truedata[post1_url]['type']='post'post1_data['id']='2604671409127216170'post1_data['likes']=1--id------48335815772--profile_pic_url------https://scontent-arn2-1.cdninstagram.com/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_ohc=DTLSrWbkEzYAX9J25Bg&edm=AJ9x6zYBAAAA&ccb=7-4&oh=cdfbd95c2e902e0ba36878de94826257&oe=6115D58F&_nc_sid=cff2a4&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4--username------antonnechaev990--media_count----1--full------id----------48335815772------is_verified--------False------profile_pic_url----------https://scontent-arn2-1.cdninstagram.com/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_ohc=DTLSrWbkEzYAX9J25Bg&edm=AJ9x6zYBAAAA&ccb=7-4&oh=cdfbd95c2e902e0ba36878de94826257&oe=6115D58F&_nc_sid=cff2a4&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4------username----------antonnechaev990------blocked_by_viewer--------False------restricted_by_viewer--------False------followed_by_viewer--------False------full_name----------Testing------has_blocked_viewer--------False------is_private--------False------is_unpublished--------False------requested_by_viewer--------False------pass_tiering_recommendation--------False------edge_owner_to_timeline_media----------count------------1------edge_followed_by----------count------------1Printingallpost1data:--type------image--id------2604671409127216170--shortcode------CQlptixpNQq--post_url------https://www.instagram.com/p/CQlptixpNQq/--dimesions------height--------1080------width--------1080--src------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=AABBvjUBAAAA&ccb=7-4&oh=1ba6faeba4925e7a24d76b50922a12ea&oe=61169DA8&_nc_sid=83d603--srcs--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=AABBvjUBAAAA&ccb=7-4&oh=14eb7e11de612dbac35cb161dcf1e2b4&oe=61165B6A&_nc_sid=83d603--------config_width----------640--------config_height----------640--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s750x750/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=AABBvjUBAAAA&ccb=7-4&oh=0b5bd0a083fda0bfb7761b432ba7d07c&oe=611666F1&_nc_sid=83d603--------config_width----------750--------config_height----------750--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=AABBvjUBAAAA&ccb=7-4&oh=1ba6faeba4925e7a24d76b50922a12ea&oe=61169DA8&_nc_sid=83d603--------config_width----------1080--------config_height----------1080--is_video----False--text------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.--comments_disabled----False--likes----1--owner------id----------48335815772------profile_pic_url----------https://scontent-arn2-1.cdninstagram.com/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_ohc=DTLSrWbkEzYAX9J25Bg&edm=AJ9x6zYBAAAA&ccb=7-4&oh=cdfbd95c2e902e0ba36878de94826257&oe=6115D58F&_nc_sid=cff2a4&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4------username----------antonnechaev990------media_count--------1------full----------id--------------48335815772----------is_verified------------False----------profile_pic_url--------------https://scontent-arn2-1.cdninstagram.com/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_ohc=DTLSrWbkEzYAX9J25Bg&edm=AJ9x6zYBAAAA&ccb=7-4&oh=cdfbd95c2e902e0ba36878de94826257&oe=6115D58F&_nc_sid=cff2a4&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4----------username--------------antonnechaev990----------blocked_by_viewer------------False----------restricted_by_viewer------------False----------followed_by_viewer------------False----------full_name--------------Testing----------has_blocked_viewer------------False----------is_private------------False----------is_unpublished------------False----------requested_by_viewer------------False----------pass_tiering_recommendation------------False----------edge_owner_to_timeline_media--------------count----------------1----------edge_followed_by--------------count----------------1--location----None--timestamp----1624721049get_response.pyfrominsta_checkerimportInstaChecker,super_printimportasyncioasyncdefmain():cookie='ds_user_id=48743733271;mid=YQgRZwAAAAEPjPkWIONy9q0lPPdu;sessionid=48743733271%3AJRUhxoYZxBh4BX%3A6;ig_nrcb=1;ig_did=A446BA65-9920-462A-BAA8-F85FEAC0AB98;csrftoken=iD5MZwMnXZHgNzm8H5kACrNHKVBIvpDz;rur="CLN\05448743733271\0541659454776:01f7e7cbc38f962c9fbe9fe015e28ac99145941e231df3769a1682f8ce14b2a8ca254ddf";'checker=InstaChecker(cookie=cookie)url='https://www.instagram.com/antonnechaev990/'print(f"{checker.ready= }")awaitchecker.check_conf()print(f"{checker.ready= }")ifchecker.ready:print('Conf is ok, making stuff')# stuffdata=awaitchecker.get_response(url)"""returns'your-url': {'success': (bool),'data': (dict),'errors': (dict of strings)}"""data=data[url]success=data['success']errors=data['errors']data=data['data']print(f"{success= }")ifsuccess:print(f"{data['id']= }")print(f"{data['avatar_url']= }")print(f"{data['followers']= }")print(f"{data['follows']= }")print(f"{data['media_count']= }")print(f"{data['recent_media'][0]['text']= }")print('')print('Printing all data:')super_print(data)asyncio.run(main())Output:checker.ready=FalseInstaChecker-ConfigOKchecker.ready=TrueConfisok,makingstuffsuccess=Truedata['id']='48335815772'data['avatar_url']='https://instagram.fevn6-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.fevn6-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8JfxId&edm=AL4D0a4BAAAA&ccb=7-4&oh=f1d76137ab3469dab27c1b2eb5bf10f3&oe=6115D58F&_nc_sid=712cc3&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4'data['followers']=1data['follows']=2data['media_count']=1data['recent_media'][0]['text']="Photo by Testing on June 26, 2021. May be an image of text that says 'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'."Printingalldata:--id------48335815772--username------antonnechaev990--connected_fb_page----None--media_count----1--biography--------followers----1--follows----2--full_name------Testing--avatar_url------https://instagram.fevn6-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.fevn6-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8JfxId&edm=AL4D0a4BAAAA&ccb=7-4&oh=f1d76137ab3469dab27c1b2eb5bf10f3&oe=6115D58F&_nc_sid=712cc3&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4--avatar_url_hd------https://instagram.fevn6-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.fevn6-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8JfxId&edm=AL4D0a4BAAAA&ccb=7-4&oh=f1d76137ab3469dab27c1b2eb5bf10f3&oe=6115D58F&_nc_sid=712cc3&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4--recent_media--------type------------image--------id------------2604671409127216170--------shortcode------------CQlptixpNQq--------post_url------------https://www.instagram.com/p/CQlptixpNQq/--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83--------dimesions------------height--------------1080------------width--------------1080--------thumbnail_src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------thumbnails--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83--------------config_width----------------150--------------config_height----------------150--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83--------------config_width----------------240--------------config_height----------------240--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83--------------config_width----------------320--------------config_height----------------320--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83--------------config_width----------------480--------------config_height----------------480--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------------config_width----------------640--------------config_height----------------640--------is_video----------False--------text------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.--------comments----------0--------comments_disabled----------False--------likes----------1--------owner------------id----------------48335815772------------username----------------antonnechaev990--------location----------None--------timestamp----------1624721049--------type------------image--------id------------2604671409127216170--------shortcode------------CQlptixpNQq--------post_url------------https://www.instagram.com/p/CQlptixpNQq/--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83--------dimesions------------height--------------1080------------width--------------1080--------thumbnail_src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------thumbnails--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83--------------config_width----------------150--------------config_height----------------150--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83--------------config_width----------------240--------------config_height----------------240--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83--------------config_width----------------320--------------config_height----------------320--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83--------------config_width----------------480--------------config_height----------------480--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------------config_width----------------640--------------config_height----------------640--------owner------------id----------------48335815772------------username----------------antonnechaev990--------is_video----------False--------text------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.--------comments----------0--------comments_disabled----------False--------likes----------1--------location----------None--------timestamp----------1624721049--------full------------__typename----------------GraphImage------------id----------------2604671409127216170------------shortcode----------------CQlptixpNQq------------dimensions----------------height------------------1080----------------width------------------1080------------display_url----------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83------------edge_media_to_tagged_user----------------edges------------fact_check_overall_rating--------------None------------fact_check_information--------------None------------gating_info--------------None------------sharing_friction_info----------------should_have_sharing_friction------------------False----------------bloks_app_url------------------None------------media_overlay_info--------------None------------media_preview----------------ACoq6Nt3b1/yKXJ9P1rC8+T+835mjz5P7zfmarlOX267P8DbDEcNTgCM5OfT2rBFw5GQzY+poFw7DIZvzNHKP2y7M36WsDz5P7zfmaPPk/vN+Zo5Re3XZkdFFIc9uas4yAjdkr93v/tfT/PNTKQRkdKTLelKM9xikaSd16ba/n3f9bWs6iiiqMjY+xReh/M0fYovQ/masOARzUaovoPyrK7PU5I/yr7iH7Gnp+ppwsou4/U1bprDIouxckey+5Fb7FF6H8zR9ii9D+Zq0vSloux8kf5V9x//2Q==------------owner----------------id--------------------48335815772----------------username--------------------antonnechaev990------------is_video--------------False------------has_upcoming_event--------------False------------accessibility_caption----------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.------------edge_media_to_caption----------------edges------------edge_media_to_comment----------------count------------------0------------comments_disabled--------------False------------taken_at_timestamp--------------1624721049------------edge_liked_by----------------count------------------1------------edge_media_preview_like----------------count------------------1------------location--------------None------------thumbnail_src----------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83------------thumbnail_resources------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83------------------config_width--------------------150------------------config_height--------------------150------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83------------------config_width--------------------240------------------config_height--------------------240------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83------------------config_width--------------------320------------------config_height--------------------320------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83------------------config_width--------------------480------------------config_height--------------------480------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83------------------config_width--------------------640------------------config_height--------------------640------------coauthor_producerssource_to_data.pyimportsysfrominsta_checkerimportInstaChecker,super_printimportasyncioimportaiohttp# You can make it yourself in the way you preferasyncdefget_source(url,headers=None,proxy=None):session=aiohttp.ClientSession()response_result={'success':False,'data':'','errors':[],}try:ifproxyandheaders:response=awaitsession.get(url,proxy=proxy,headers=headers)elifproxy:response=awaitsession.get(url,proxy=proxy)elifheaders:response=awaitsession.get(url,headers=headers)else:response=awaitsession.get(url)ifresponse.status==200:response_result['success']=Trueresponse_result['data']=awaitresponse.text()else:response_result['success']=Falseresponse_result['errors'].append(f'Response status is{int(response.status)}')if'not-logged-in'inresponse_result['data']:response_result['success']=Falseresponse_result['errors'].append('Not logged in, provide better headers')exceptBaseExceptionasex:response_result['success']=Trueresponse_result['errors'].append(f"Can't fetch and parse the page. Error: '{ex}'. On line{sys.exc_info()[-1].tb_lineno}")awaitsession.close()return{url:response_result}asyncdefmain():cookie='ds_user_id=48743733271;mid=YQgRZwAAAAEPjPkWIONy9q0lPPdu;sessionid=48743733271%3AJRUhxoYZxBh4BX%3A6;ig_nrcb=1;ig_did=A446BA65-9920-462A-BAA8-F85FEAC0AB98;csrftoken=iD5MZwMnXZHgNzm8H5kACrNHKVBIvpDz;rur="CLN\05448743733271\0541659454776:01f7e7cbc38f962c9fbe9fe015e28ac99145941e231df3769a1682f8ce14b2a8ca254ddf";'checker=InstaChecker(cookie=cookie)url='https://www.instagram.com/antonnechaev990/'source_response_result=awaitget_source(url,checker.headers,checker.proxy)data=checker.source_to_data(source_response_result[url])success=data['success']errors=data['errors']data=data['data']print(f"{success= }")ifsuccess:print(f"{data['id']= }")print(f"{data['avatar_url']= }")print(f"{data['followers']= }")print(f"{data['follows']= }")print(f"{data['media_count']= }")print(f"{data['recent_media'][0]['text']= }")print('')print('Printing all data:')super_print(data)asyncio.run(main())Output:success=Truedata['id']='48335815772'data['avatar_url']='https://instagram.faly2-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.faly2-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8-qUQD&edm=ABFeTR8BAAAA&ccb=7-4&oh=0b1e57f6904aabbf9073eb19e4208f0b&oe=6115D58F&_nc_sid=93c1bc&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4'data['followers']=1data['follows']=2data['media_count']=1data['recent_media'][0]['text']="Photo by Testing on June 26, 2021. May be an image of text that says 'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'."Printingalldata:--id------48335815772--username------antonnechaev990--connected_fb_page----None--media_count----1--biography--------followers----1--follows----2--full_name------Testing--avatar_url------https://instagram.faly2-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.faly2-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8-qUQD&edm=ABFeTR8BAAAA&ccb=7-4&oh=0b1e57f6904aabbf9073eb19e4208f0b&oe=6115D58F&_nc_sid=93c1bc&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4--avatar_url_hd------https://instagram.faly2-1.fna.fbcdn.net/v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.faly2-1.fna.fbcdn.net&_nc_ohc=DTLSrWbkEzYAX8-qUQD&edm=ABFeTR8BAAAA&ccb=7-4&oh=0b1e57f6904aabbf9073eb19e4208f0b&oe=6115D58F&_nc_sid=93c1bc&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.2-ccb7-4--recent_media--------type------------image--------id------------2604671409127216170--------shortcode------------CQlptixpNQq--------post_url------------https://www.instagram.com/p/CQlptixpNQq/--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83--------dimesions------------height--------------1080------------width--------------1080--------thumbnail_src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------thumbnails--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83--------------config_width----------------150--------------config_height----------------150--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83--------------config_width----------------240--------------config_height----------------240--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83--------------config_width----------------320--------------config_height----------------320--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83--------------config_width----------------480--------------config_height----------------480--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------------config_width----------------640--------------config_height----------------640--------is_video----------False--------text------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.--------comments----------0--------comments_disabled----------False--------likes----------1--------owner------------id----------------48335815772------------username----------------antonnechaev990--------location----------None--------timestamp----------1624721049--------type------------image--------id------------2604671409127216170--------shortcode------------CQlptixpNQq--------post_url------------https://www.instagram.com/p/CQlptixpNQq/--------src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83--------dimesions------------height--------------1080------------width--------------1080--------thumbnail_src------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------thumbnails--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83--------------config_width----------------150--------------config_height----------------150--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83--------------config_width----------------240--------------config_height----------------240--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83--------------config_width----------------320--------------config_height----------------320--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83--------------config_width----------------480--------------config_height----------------480--------------src------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83--------------config_width----------------640--------------config_height----------------640--------owner------------id----------------48335815772------------username----------------antonnechaev990--------is_video----------False--------text------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.--------comments----------0--------comments_disabled----------False--------likes----------1--------location----------None--------timestamp----------1624721049--------full------------__typename----------------GraphImage------------id----------------2604671409127216170------------shortcode----------------CQlptixpNQq------------dimensions----------------height------------------1080----------------width------------------1080------------display_url----------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=b35547079fcd31703df24659845b524e&oe=61169DA8&_nc_sid=7bff83------------edge_media_to_tagged_user----------------edges------------fact_check_overall_rating--------------None------------fact_check_information--------------None------------gating_info--------------None------------sharing_friction_info----------------should_have_sharing_friction------------------False----------------bloks_app_url------------------None------------media_overlay_info--------------None------------media_preview----------------ACoq6Nt3b1/yKXJ9P1rC8+T+835mjz5P7zfmarlOX267P8DbDEcNTgCM5OfT2rBFw5GQzY+poFw7DIZvzNHKP2y7M36WsDz5P7zfmaPPk/vN+Zo5Re3XZkdFFIc9uas4yAjdkr93v/tfT/PNTKQRkdKTLelKM9xikaSd16ba/n3f9bWs6iiiqMjY+xReh/M0fYovQ/masOARzUaovoPyrK7PU5I/yr7iH7Gnp+ppwsou4/U1bprDIouxckey+5Fb7FF6H8zR9ii9D+Zq0vSloux8kf5V9x//2Q==------------owner----------------id--------------------48335815772----------------username--------------------antonnechaev990------------is_video--------------False------------has_upcoming_event--------------False------------accessibility_caption----------------PhotobyTestingonJune26,2021.Maybeanimageoftextthatsays'x 6 Game Over × WINNER! Restart game GAMES & TOYS TOOLS'.------------edge_media_to_caption----------------edges------------edge_media_to_comment----------------count------------------0------------comments_disabled--------------False------------taken_at_timestamp--------------1624721049------------edge_liked_by----------------count------------------1------------edge_media_preview_like----------------count------------------1------------location--------------None------------thumbnail_src----------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83------------thumbnail_resources------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d31413bed658502d2998ce97b9f5aba4&oe=6115D1A3&_nc_sid=7bff83------------------config_width--------------------150------------------config_height--------------------150------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=227104b3c78166d9ed08714b8f5b87b0&oe=611708D0&_nc_sid=7bff83------------------config_width--------------------240------------------config_height--------------------240------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=d6ce7cdd41f4fa3d6213f68cf3cead27&oe=61160E9D&_nc_sid=7bff83------------------config_width--------------------320------------------config_height--------------------320------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=17910b3dbb1ac6c6264faee25598d05e&oe=6115DBC1&_nc_sid=7bff83------------------config_width--------------------480------------------config_height--------------------480------------------src----------------------https://scontent-hel3-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/207554847_321832179605661_6198453185168062_n.jpg?_nc_ht=scontent-hel3-1.cdninstagram.com&_nc_cat=109&_nc_ohc=AgfUPKpqHHYAX_FMAHM&edm=ABfd0MgBAAAA&ccb=7-4&oh=31ce3cd914417eb9b94e203e8580b62f&oe=61165B6A&_nc_sid=7bff83------------------config_width--------------------640------------------config_height--------------------640------------coauthor_producers