My goal is to input a username into the following format:
https://www.instagram.com/{username}/?__a=1
I found this useful thread with a great tip on how to do it.
Next, I need to access that link using Java and retrieve the page code. Here's an example using professional skateboarder Nyjah Huston:
{"logging_page_id":"profilePage_8223552","show_suggested_profiles":false,"show_follow_dialog":false,"graphql":{"user":{"biography":"Sender\ud83d\ude08\n@nikesb @monsterenergy @elementbrand @blackplaguebrewing @socialcbd @priverevaux","blocked_by_viewer":false,"restricted_by_viewer":null,"country_block":false,"external_url":"https://www.nike.com/t/sb-nyjah-free-skate-shoe-oKwn7N/AA4272-300","external_url_linkshimmed":"https://l.instagram.com/?u=https%3A%2F%2Fwww.nike.com%2Ft%2Fsb-nyjah-free-skate-shoe-oKwn7N%2FAA4272-300&e=ATMW9Q8NwN2Mcwm_Bd5I8DeuAKP4L7IHpy_PdylDnGU8qqokJU6Z1kh_emEIVfJ1q8Xtq1b0&s=1","edge_followed_by":{"count":3969537},"followed_by_viewer":false,"edge_follow":{"count":694},"follows_viewer":false,"full_name":"Nyjah Huston"
The User ID can be found at the beginning of the page:
{"logging_page_id":"profilePage_8223552"
In this case, the user id is 8223552. Since I am new to Java, I would appreciate guidance on how to navigate the link, extract the data, and convert the user id into a variable for use in my Google script. Thank you for your assistance!