Skip to content

Commit

Permalink
fix(Instagram): invalid query hash fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Udhayarajan committed Jul 19, 2023
1 parent 7a4cfa4 commit 1df0046
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ class Instagram internal constructor(url: String) : Extractor(url) {
private suspend fun tryWithQueryHash(page: String) {
val queryHash = withTimeoutOrNull(2000) {
getQueryHashFromAllJSInPage(page)
} ?: ""
} ?: DEFAULT_QUERY_HASH
val res = HttpRequest(GRAPHQL_URL.format(queryHash, getShortcode()), headers).getResponse()
val shortcodeMedia =
res?.toJSONObject()?.getJSONObject("data")?.getNullableJSONObject("shortcode_media") ?: run {
Expand Down

0 comments on commit 1df0046

Please sign in to comment.