postaddictme / instagram-java-scraper

Instagram Java Scraper. Get account information, photos, videos and comments.
446 stars 149 forks source link

Failed to JSON parse error #128

Closed Actticus closed 5 years ago

Actticus commented 5 years ago

Main: import me.postaddict.instagram.scraper.Instagram; import me.postaddict.instagram.scraper.model.Tag; import okhttp3.OkHttpClient; import java.io.IOException;

'public class Main { public static void main(String[] args) { OkHttpClient httpClient = new OkHttpClient(); Instagram instagram = new Instagram(httpClient); Tag tags; try { tags = instagram.getMediasByTag("snow", 1000); System.out.println(tags.getCount()); } catch (IOException e) { e.printStackTrace(); } } } '

Logs:

`[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException [ERROR] - with linked exception: [ERROR] [Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException [ERROR] Exception Description: An error occurred unmarshalling the document [ERROR] Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)] [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException

Actticus commented 5 years ago

try it with Java 8 instead of Java 11 and it works