mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-05 20:11:36 +00:00
Merge branch 'master' into new-posts-grid
This commit is contained in:
commit
262375b145
30 changed files with 908 additions and 906 deletions
|
|
@ -58,9 +58,9 @@ public final class Constants {
|
|||
// spoof
|
||||
public static final String USER_AGENT = "Mozilla/5.0 (Linux; Android 8.1.0; motorola one Build/OPKS28.63-18-3; wv) " +
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.80 Mobile Safari/537.36 " +
|
||||
"Instagram 160.0.0.25.132 Android (27/8.1.0; 320dpi; 720x1362; motorola; motorola one; deen_sprout; qcom; pt_BR; 246889068)";
|
||||
"Instagram 161.0.0.37.121 Android (27/8.1.0; 320dpi; 720x1362; motorola; motorola one; deen_sprout; qcom; pt_BR; 248310224)";
|
||||
public static final String I_USER_AGENT =
|
||||
"Instagram 160.0.0.25.132 Android (27/8.1.0; 320dpi; 720x1362; motorola; motorola one; deen_sprout; qcom; pt_BR; 246889068)";
|
||||
"Instagram 161.0.0.37.121 Android (27/8.1.0; 320dpi; 720x1362; motorola; motorola one; deen_sprout; qcom; pt_BR; 248310224)";
|
||||
public static final String A_USER_AGENT = "https://InstaGrabber.AustinHuang.me / mailto:InstaGrabber@AustinHuang.me";
|
||||
// see https://github.com/dilame/instagram-private-api/blob/master/src/core/constants.ts
|
||||
public static final String SUPPORTED_CAPABILITIES = "[ { \"name\": \"SUPPORTED_SDK_VERSIONS\", \"value\":" +
|
||||
|
|
@ -88,4 +88,4 @@ public final class Constants {
|
|||
public static final String DEFAULT_HASH_TAG_PIC = "https://www.instagram.com/static/images/hashtag/search-hashtag-default-avatar.png/1d8417c9a4f5.png";
|
||||
public static final String SHARED_PREFERENCES_NAME = "settings";
|
||||
public static final String PREF_POSTS_LAYOUT = "posts_layout";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,19 +257,19 @@ public final class ResponseBodyUtils {
|
|||
|
||||
final JSONArray users = data.getJSONArray("users");
|
||||
final int usersLen = users.length();
|
||||
final JSONArray leftusers = data.getJSONArray("left_users");
|
||||
final int leftusersLen = leftusers.length();
|
||||
final JSONArray leftusers = data.optJSONArray("left_users");
|
||||
final int leftusersLen = leftusers == null ? 0 : leftusers.length();
|
||||
final JSONArray admins = data.getJSONArray("admin_user_ids");
|
||||
final int adminsLen = admins.length();
|
||||
|
||||
final ProfileModel[] userModels = new ProfileModel[usersLen];
|
||||
for (int j = 0; j < usersLen; ++j) {
|
||||
final JSONObject userObject = users.getJSONObject(j);
|
||||
userModels[j] = new ProfileModel(userObject.getBoolean("is_private"),
|
||||
userModels[j] = new ProfileModel(userObject.optBoolean("is_private"),
|
||||
false,
|
||||
userObject.optBoolean("is_verified"),
|
||||
String.valueOf(userObject.get("pk")),
|
||||
userObject.getString("username"),
|
||||
userObject.optString("username"), // optional cuz fb users
|
||||
userObject.getString("full_name"),
|
||||
null, null,
|
||||
userObject.getString("profile_pic_url"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue