Skip to content

Commit

Permalink
Bugfix: swapped device and model
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Dec 25, 2021
1 parent 8c32f1b commit 5c931ce
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Features:

Fast and effective Instagram Private API wrapper (public+private requests and challenge resolver) without selenium. Use the most recent version of the API from Instagram, which was obtained using [reverse-engineering with Charles Proxy](https://adw0rd.com/2020/03/26/sniffing-instagram-charles-proxy/en/) and [Proxyman](https://proxyman.io/).

*Instagram API valid for **5 December 2021** (last reverse-engineering check)*
*Instagram API valid for **25 December 2021** (last reverse-engineering check)*

Support **Python >= 3.6**, recommend 3.8+

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Fast and effective Instagram Private API wrapper (public+private requests and challenge resolver). Use the most recent version of the API from Instagram, which was obtained using [reverse-engineering with Charles Proxy](https://adw0rd.com/2020/03/26/sniffing-instagram-charles-proxy/en/) and [Proxyman](https://proxyman.io/).

*Instagram API valid for **5 December 2021** (last reverse-engineering check)*
*Instagram API valid for **25 December 2021** (last reverse-engineering check)*

Support **Python >= 3.6**, recommend 3.8+

Expand Down
16 changes: 8 additions & 8 deletions instagrapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"Instagram {app_version} "
"Android ({android_version}/{android_release}; "
"{dpi}; {resolution}; {manufacturer}; "
"{device}; {model}; {cpu}; {locale}; {version_code})"
"{model}; {device}; {cpu}; {locale}; {version_code})"
)
# Instagram 76.0.0.15.395 (iPhone9,2; iOS 10_0_2; en_US; en-US; scale=2.61; 1080x1920) AppleWebKit/420+
# Instagram 208.0.0.32.135 (iPhone; iOS 14_7_1; en_US; en-US; scale=2.61; 1080x1920) AppleWebKit/605.1.15

SOFTWARE = "{model}-user+{android_release}+OPR1.170623.012+V10.2.7.0.OAGMIXM+release-keys"
SOFTWARE = "{model}-user+{android_release}+OPR1.170623.032+V10.2.3.0.OAGMIXM+release-keys"

# QUERY_HASH_PROFILE = 'c9100bf9110dd6361671f113dd02e7d6'
# QUERY_HASH_MEDIAS = '42323d64886122307be10013ad2dcc44'
Expand All @@ -32,11 +32,11 @@
SUPPORTED_CAPABILITIES = [
{
"name": "SUPPORTED_SDK_VERSIONS",
"value": "80.0,81.0,82.0,83.0,84.0,85.0,86.0,87.0,88.0,89.0,90.0,91.0,92.0,93.0,94.0,95.0,96.0,97.0,98.0,99.0,100.0,101.0,102.0,103.0,104.0,105.0,106.0,107.0,108.0,109.0,110.0,111.0"
"value": "108.0,109.0,110.0,111.0,112.0,113.0,114.0,115.0,116.0,117.0,118.0,119.0,120.0,121.0,122.0,123.0,124.0,125.0,126.0,127.0"
},
{"name": "FACE_TRACKER_VERSION", "value": "14"},
{"name": "segmentation", "value": "segmentation_enabled"},
{"name": "COMPRESSION", "value": "ETC2_COMPRESSION"},
{"name": "world_tracker", "value": "world_tracker_enabled"},
{"name": "gyroscope", "value": "gyroscope_enabled"}
{"name": "FACE_TRACKER_VERSION","value": "14"},
{"name": "segmentation","value": "segmentation_enabled"},
{"name": "COMPRESSION","value": "ETC2_COMPRESSION"},
{"name": "world_tracker","value": "world_tracker_enabled"},
{"name": "gyroscope","value": "gyroscope_enabled"}
]
4 changes: 2 additions & 2 deletions instagrapi/mixins/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ def set_device(self, device: Dict = None, reset: bool = False) -> bool:
"dpi": "480dpi",
"resolution": "1080x1920",
"manufacturer": "Xiaomi",
"device": "MI 5s",
"model": "capricorn",
"device": "capricorn",
"model": "MI 5s",
"cpu": "qcom",
"version_code": "314665256",
}
Expand Down
3 changes: 2 additions & 1 deletion instagrapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ def generate_jazoest(symbols: str) -> str:


def date_time_original(localtime):
return time.strftime("%Y:%m:%d+%H:%M:%S", localtime)
# return time.strftime("%Y:%m:%d+%H:%M:%S", localtime)
return time.strftime("%Y%m%dT%H%M%S.000Z", localtime)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='instagrapi',
version='1.16.3',
version='1.16.4',
author='Mikhail Andreev',
author_email='[email protected]',
license='MIT',
Expand Down
4 changes: 2 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ def test_country_locale_timezone(self):
"dpi": "480dpi",
"resolution": "1080x1920",
"manufacturer": "Xiaomi",
"device": "MI 5s",
"model": "capricorn",
"device": "capricorn",
"model": "MI 5s",
"cpu": "qcom",
"version_code": "301484483"
},
Expand Down

0 comments on commit 5c931ce

Please sign in to comment.