Skip to content

How to fetch instagram profile page with HtmlUnit #625

@dulocart

Description

@dulocart

I am trying to get Instagram profile page without authentication to check if the user have profile image.
Appear that when you load the page is have some splash screen and you can see the page source.
Any help how to deal with this, and get the page source to check if the user have profile picture.

My settings are:

webClient.getOptions().setJavaScriptEnabled(false); // when I enable it is have exception
webClient.getOptions().setCssEnabled(false);

webClient.addRequestHeader("User-Agent".....)

HtmlPage page = webClient.getPage("https://www.instagram.com/profile_username/?hl=us");
           Thread.sleep(10000);
           page.refresh();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions