Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
41 changed files with 428 additions and 93 deletions
-
2README.md
-
133app/src/main/java/awais/instagrabber/MainHelper.java
-
4app/src/main/java/awais/instagrabber/activities/DirectMessagesUserInbox.java
-
19app/src/main/java/awais/instagrabber/activities/Main.java
-
13app/src/main/java/awais/instagrabber/activities/PostViewer.java
-
25app/src/main/java/awais/instagrabber/activities/ProfileViewer.java
-
7app/src/main/java/awais/instagrabber/activities/StoryViewer.java
-
72app/src/main/java/awais/instagrabber/asyncs/HashtagFetcher.java
-
2app/src/main/java/awais/instagrabber/asyncs/PostsFetcher.java
-
20app/src/main/java/awais/instagrabber/asyncs/ProfilePictureFetcher.java
-
11app/src/main/java/awais/instagrabber/asyncs/StoryStatusFetcher.java
-
2app/src/main/java/awais/instagrabber/customviews/helpers/GridAutofitLayoutManager.java
-
33app/src/main/java/awais/instagrabber/models/HashtagModel.java
-
9app/src/main/java/awais/instagrabber/models/StoryModel.java
-
2app/src/main/java/awais/instagrabber/models/enums/ProfilePictureFetchMode.java
-
1app/src/main/java/awais/instagrabber/utils/Constants.java
-
16app/src/main/java/awais/instagrabber/utils/DataBox.java
-
25app/src/main/java/awais/instagrabber/utils/FlavorTown.java
-
14app/src/main/java/awais/instagrabber/utils/UpdateChecker.java
-
2app/src/main/java/awais/instagrabber/utils/Utils.java
-
1app/src/main/java/awaisomereport/LogCollector.java
-
57app/src/main/res/layout/activity_main.xml
-
10app/src/main/res/layout/activity_viewer.xml
-
1app/src/main/res/values-es/arrays.xml
-
1app/src/main/res/values-es/strings.xml
-
1app/src/main/res/values-fr/arrays.xml
-
1app/src/main/res/values-fr/strings.xml
-
1app/src/main/res/values-in/arrays.xml
-
1app/src/main/res/values-in/strings.xml
-
1app/src/main/res/values-it/arrays.xml
-
1app/src/main/res/values-it/strings.xml
-
1app/src/main/res/values-zh/arrays.xml
-
3app/src/main/res/values-zh/strings.xml
-
1app/src/main/res/values/arrays.xml
-
10app/src/main/res/values/strings.xml
-
2fastlane/metadata/android/changelogs/32.txt
-
9fastlane/metadata/android/changelogs/33.txt
-
5fastlane/metadata/android/full_description.txt
-
BINfastlane/metadata/android/images/phoneScreenshots/1.jpg
-
BINfastlane/metadata/android/images/phoneScreenshots/4.jpg
-
2fastlane/metadata/android/short_description.txt
@ -0,0 +1,72 @@ |
|||
package awais.instagrabber.asyncs; |
|||
|
|||
import android.os.AsyncTask; |
|||
import android.util.Log; |
|||
|
|||
import androidx.annotation.Nullable; |
|||
|
|||
import org.json.JSONArray; |
|||
import org.json.JSONObject; |
|||
|
|||
import java.net.HttpURLConnection; |
|||
import java.net.URL; |
|||
|
|||
import awais.instagrabber.BuildConfig; |
|||
import awais.instagrabber.interfaces.FetchListener; |
|||
import awais.instagrabber.models.HashtagModel; |
|||
import awais.instagrabber.utils.Constants; |
|||
import awais.instagrabber.utils.Utils; |
|||
import awaisomereport.LogCollector; |
|||
|
|||
import static awais.instagrabber.utils.Utils.logCollector; |
|||
|
|||
public final class HashtagFetcher extends AsyncTask<Void, Void, HashtagModel> { |
|||
private final FetchListener<HashtagModel> fetchListener; |
|||
private final String hashtag; |
|||
|
|||
public HashtagFetcher(String hashtag, FetchListener<HashtagModel> fetchListener) { |
|||
this.hashtag = hashtag; |
|||
this.fetchListener = fetchListener; |
|||
} |
|||
|
|||
@Nullable |
|||
@Override |
|||
protected HashtagModel doInBackground(final Void... voids) { |
|||
HashtagModel result = null; |
|||
|
|||
try { |
|||
final HttpURLConnection conn = (HttpURLConnection) new URL("https://www.instagram.com/explore/tags/" + hashtag + "/?__a=1").openConnection(); |
|||
conn.setUseCaches(true); |
|||
conn.connect(); |
|||
|
|||
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { |
|||
final JSONObject user = new JSONObject(Utils.readFromConnection(conn)).getJSONObject("graphql").getJSONObject(Constants.EXTRAS_HASHTAG); |
|||
|
|||
final JSONObject timelineMedia = user.getJSONObject("edge_hashtag_to_media"); |
|||
if (timelineMedia.has("edges")) { |
|||
final JSONArray edges = timelineMedia.getJSONArray("edges"); |
|||
} |
|||
|
|||
result = new HashtagModel( |
|||
user.getString(Constants.EXTRAS_ID), |
|||
user.getString("name"), |
|||
user.getString("profile_pic_url"), |
|||
timelineMedia.getLong("count"), |
|||
user.optBoolean("is_following")); |
|||
} |
|||
|
|||
conn.disconnect(); |
|||
} catch (final Exception e) { |
|||
if (logCollector != null) |
|||
logCollector.appendException(e, LogCollector.LogFile.ASYNC_HASHTAG_FETCHER, "doInBackground"); |
|||
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", e); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
@Override |
|||
protected void onPostExecute(final HashtagModel result) { |
|||
if (fetchListener != null) fetchListener.onResult(result); |
|||
} |
|||
} |
@ -0,0 +1,33 @@ |
|||
package awais.instagrabber.models; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
public final class HashtagModel implements Serializable { |
|||
private final boolean following; |
|||
private final long postCount; |
|||
private final String id, name, sdProfilePic; |
|||
|
|||
public HashtagModel(final String id, final String name, final String sdProfilePic, final long postCount, final boolean following) { |
|||
this.id = id; |
|||
this.name = name; |
|||
this.sdProfilePic = sdProfilePic; |
|||
this.postCount = postCount; |
|||
this.following = following; |
|||
} |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public String getSdProfilePic() { |
|||
return sdProfilePic; |
|||
} |
|||
|
|||
public long getPostCount() { return postCount; } |
|||
|
|||
public boolean getFollowing() { return following; } |
|||
} |
@ -0,0 +1,9 @@ |
|||
* Full support on hashtags, including stories, "profile picture" (SD only), post count, and (un)following. Removed "Hashtag:" prefix. |
|||
* Non-logged-in users now have an "add/remove from favorites" button on the profile/hashtag page, alongside Quick Access. |
|||
* Update checker will now have a F-Droid button |
|||
* Updated Italian and Simplified Chinese translations |
|||
* Adjusted grid size threshold at popular request |
|||
* Adjusted post viewer component sizes (to prevent the buttons being squished downwards, but the exact outcome depends on device) |
|||
* Fixed a bug where highlights of the viewed user gets carried to other users |
|||
* Fixed a bug where mentions in feeds were parsed incorrectly |
|||
* Removed Insta-Stalker (defunct) as an HD profile picture provider, existing users are moved to Instafullsize upon first run. |
Before Width: 1080 | Height: 1920 | Size: 161 KiB After Width: 720 | Height: 1280 | Size: 146 KiB |
After Width: 720 | Height: 1280 | Size: 159 KiB |
@ -1 +1 @@ |
|||
A simple yet advanced viewer/downloader app for Instagram (+login support). |
|||
A simple yet advanced client for Instagram, with login support! |
Write
Preview
Loading…
Cancel
Save
Reference in new issue