postaddictme / instagram-java-scraper

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

not working Response code is not equal 200. Something went wrong. Please report issue. #155

Open PejmanDaie opened 3 years ago

PejmanDaie commented 3 years ago

--> GET https://www.instagram.com/p/BGY0zB4r7X2/?__a=1 http/1.1 Host: www.instagram.com Connection: Keep-Alive Accept-Encoding: gzip User-Agent: okhttp/3.2.0 --> END GET <-- 302 Found https://www.instagram.com/p/BGY0zB4r7X2/?__a=1 (415ms) Content-Type: text/html; charset=utf-8 Location: https://www.instagram.com/accounts/login/ Vary: Accept-Language, Cookie Content-Language: en Date: Mon, 28 Dec 2020 06:45:34 GMT Strict-Transport-Security: max-age=31536000 Cache-Control: private, no-cache, no-store, must-revalidate Pragma: no-cache Expires: Sat, 01 Jan 2000 00:00:00 GMT X-Frame-Options: SAMEORIGIN content-security-policy: report-uri https://www.instagram.com/security/csp_report/; default-src 'self' https://www.instagram.com; img-src data: blob: https://*.fbcdn.net https://*.instagram.com https://*.cdninstagram.com https://*.facebook.com https://*.giphy.com; font-src data: https://*.fbcdn.net https://*.instagram.com https://*.cdninstagram.com; media-src 'self' blob: https://www.instagram.com https://*.cdninstagram.com https://*.fbcdn.net; manifest-src 'self' https://www.instagram.com; script-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://*.cdninstagram.com wss://www.instagram.com https://*.facebook.com https://*.fbcdn.net https://*.facebook.net 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' https://*.www.instagram.com https://www.instagram.com 'unsafe-inline'; connect-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://graph.instagram.com https://*.graph.instagram.com https://*.cdninstagram.com https://api.instagram.com https://i.instagram.com wss://www.instagram.com wss://edge-chat.instagram.com https://*.facebook.com https://*.fbcdn.net https://*.facebook.net chrome-extension://boadgeojelhgndaghljhdicfkmllpafd blob:; worker-src 'self' blob: https://www.instagram.com; frame-src 'self' https://instagram.com https://www.instagram.com https://*.instagram.com https://staticxx.facebook.com https://www.facebook.com https://web.facebook.com https://connect.facebook.net https://m.facebook.com; object-src 'none'; upgrade-insecure-requests cross-origin-embedder-policy-report-only: require-corp;report-to="coep" report-to: {"group": "coep", "max_age": 86400, "endpoints": [{"url": "/security/coep_report/"}]},{"group": "coop", "max_age": 86400, "endpoints": [{"url": "/security/coop_report/"}]} origin-trial: AjcL0rumUt87PwHmMhaXS+q6xAH1x9IrsLFeL/ZqUbTbe1c+Cso8nAKcRjvvONAmcB7OxMtj7wnIiBh9BqKJBQEAAAB6eyJvcmlnaW4iOiJodHRwczovL2luc3RhZ3JhbS5jb206NDQzIiwiZmVhdHVyZSI6IkNyb3NzT3JpZ2luT3BlbmVyUG9saWN5UmVwb3J0aW5nIiwiZXhwaXJ5IjoxNjA5NDI3NTI4LCJpc1N1YmRvbWFpbiI6dHJ1ZX0= cross-origin-opener-policy: same-origin-allow-popups;report-to="coop" X-Content-Type-Options: nosniff X-XSS-Protection: 0 x-aed: 36 Access-Control-Expose-Headers: X-IG-Set-WWW-Claim Set-Cookie: ig_did=3715EBED-6F1F-41A0-9CA8-68546A068F89; Domain=.instagram.com; expires=Wed, 28-Dec-2022 06:45:34 GMT; HttpOnly; Max-Age=63072000; Path=/; Secure Set-Cookie: mid=X-l_DgAEAAH9Lrn4-xB3aUxLlJYE; Domain=.instagram.com; expires=Wed, 28-Dec-2022 06:45:34 GMT; Max-Age=63072000; Path=/; Secure Set-Cookie: ig_nrcb=1; Domain=.instagram.com; expires=Tue, 28-Dec-2021 06:45:34 GMT; Max-Age=31536000; Path=/; Secure X-FB-TRIP-ID: 1679558926 Alt-Svc: h3-29=":443"; ma=3600,h3-27=":443"; ma=3600 Connection: keep-alive Content-Length: 0 OkHttp-Sent-Millis: 1609137934060 OkHttp-Received-Millis: 1609137934441 <-- END HTTP (0-byte body) --> GET https://www.instagram.com/accounts/login/ http/1.1 Host: www.instagram.com Connection: Keep-Alive Accept-Encoding: gzip Cookie: ig_nrcb=1; mid=X-l_DgAEAAH9Lrn4-xB3aUxLlJYE; ig_did=3715EBED-6F1F-41A0-9CA8-68546A068F89 User-Agent: okhttp/3.2.0 --> END GET <-- 429 - https://www.instagram.com/accounts/login/ (319ms) Content-Type: text/html; charset=utf-8 Vary: Accept-Language, Cookie Content-Language: en Date: Mon, 28 Dec 2020 06:45:35 GMT Strict-Transport-Security: max-age=31536000 Cache-Control: private, no-cache, no-store, must-revalidate Pragma: no-cache Expires: Sat, 01 Jan 2000 00:00:00 GMT X-Frame-Options: SAMEORIGIN content-security-policy: report-uri https://www.instagram.com/security/csp_report/; default-src 'self' https://www.instagram.com; img-src data: blob: https://*.fbcdn.net https://*.instagram.com https://*.cdninstagram.com https://*.facebook.com https://*.giphy.com; font-src data: https://*.fbcdn.net https://*.instagram.com https://*.cdninstagram.com; media-src 'self' blob: https://www.instagram.com https://*.cdninstagram.com https://*.fbcdn.net; manifest-src 'self' https://www.instagram.com; script-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://*.cdninstagram.com wss://www.instagram.com https://*.facebook.com https://*.fbcdn.net https://*.facebook.net 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' https://*.www.instagram.com https://www.instagram.com 'unsafe-inline'; connect-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://graph.instagram.com https://*.graph.instagram.com https://*.cdninstagram.com https://api.instagram.com https://i.instagram.com wss://www.instagram.com wss://edge-chat.instagram.com https://*.facebook.com https://*.fbcdn.net https://*.facebook.net chrome-extension://boadgeojelhgndaghljhdicfkmllpafd blob:; worker-src 'self' blob: https://www.instagram.com; frame-src 'self' https://instagram.com https://www.instagram.com https://*.instagram.com https://staticxx.facebook.com https://www.facebook.com https://web.facebook.com https://connect.facebook.net https://m.facebook.com; object-src 'none'; upgrade-insecure-requests cross-origin-embedder-policy-report-only: require-corp;report-to="coep" report-to: {"group": "coep", "max_age": 86400, "endpoints": [{"url": "/security/coep_report/"}]},{"group": "coop", "max_age": 86400, "endpoints": [{"url": "/security/coop_report/"}]} origin-trial: AjcL0rumUt87PwHmMhaXS+q6xAH1x9IrsLFeL/ZqUbTbe1c+Cso8nAKcRjvvONAmcB7OxMtj7wnIiBh9BqKJBQEAAAB6eyJvcmlnaW4iOiJodHRwczovL2luc3RhZ3JhbS5jb206NDQzIiwiZmVhdHVyZSI6IkNyb3NzT3JpZ2luT3BlbmVyUG9saWN5UmVwb3J0aW5nIiwiZXhwaXJ5IjoxNjA5NDI3NTI4LCJpc1N1YmRvbWFpbiI6dHJ1ZX0= cross-origin-opener-policy: same-origin-allow-popups;report-to="coop" X-Content-Type-Options: nosniff X-XSS-Protection: 0 x-aed: 36 Access-Control-Expose-Headers: X-IG-Set-WWW-Claim X-FB-TRIP-ID: 1679558926 Alt-Svc: h3-29=":443"; ma=3600,h3-27=":443"; ma=3600 Connection: keep-alive Content-Length: 20744 OkHttp-Sent-Millis: 1609137934504 OkHttp-Received-Millis: 1609137934823

<!DOCTYPE html>

Page Not Found • Instagram

Error

Please wait a few minutes before you try again.

<-- END HTTP (20744-byte body) 2020-12-28 10:15:38.244 ERROR 17276 --- [pool-2-thread-1] c.s.t.b.j.InstagramParsJob : InstagramParsService.execute()

me.postaddict.instagram.scraper.exception.InstagramException: Response code is not equal 200. Something went wrong. Please report issue. at me.postaddict.instagram.scraper.interceptor.ErrorInterceptor.intercept(ErrorInterceptor.java:31) ~[instagramscraper-2.2.jar:?] at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:187) ~[okhttp-3.2.0.jar:?] at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160) ~[okhttp-3.2.0.jar:?] at okhttp3.RealCall.execute(RealCall.java:57) ~[okhttp-3.2.0.jar:?] at me.postaddict.instagram.scraper.Instagram.executeHttpRequest(Instagram.java:285) ~[instagramscraper-2.2.jar:?] at me.postaddict.instagram.scraper.Instagram.getMediaByUrl(Instagram.java:116) ~[instagramscraper-2.2.jar:?] at com.sinansoft.tamashagar.biz.services.parsers.InstagramParserServiceImpl.execute(InstagramParserServiceImpl.java:37) ~[classes/:?] at com.sinansoft.tamashagar.biz.jobs.InstagramParsJob.fetchData(InstagramParsJob.java:35) [classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) [spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93) [spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_271] at java.util.concurrent.FutureTask.run$$$capture(Unknown Source) [?:1.8.0_271] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_271] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_271] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_271] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_271] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_271] at java.lang.Thread.run(Unknown Source) [?:1.8.0_271]