instagram-archiver 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of instagram-archiver might be problematic. Click here for more details.
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/PKG-INFO +2 -2
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/README.md +1 -1
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/__init__.py +1 -1
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/profile_scraper.py +23 -19
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/typing.py +1 -1
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/man/instagram-archiver.1 +2 -2
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/pyproject.toml +1 -1
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/LICENSE.txt +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/__main__.py +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/client.py +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/constants.py +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/main.py +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/py.typed +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/saved_scraper.py +0 -0
- {instagram_archiver-0.3.1 → instagram_archiver-0.3.2}/instagram_archiver/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: instagram-archiver
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Save Instagram content you have access to.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: command line,instagram
|
|
@@ -33,7 +33,7 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
[](https://pypi.org/project/instagram-archiver/)
|
|
34
34
|
[](https://github.com/Tatsh/instagram-archiver/tags)
|
|
35
35
|
[](https://github.com/Tatsh/instagram-archiver/blob/master/LICENSE.txt)
|
|
36
|
-
[](https://img.shields.io/github/commits-since/Tatsh/instagram-archiver/v0.3.2/master)](https://github.com/Tatsh/instagram-archiver/compare/v0.3.2...master)
|
|
37
37
|
[](https://github.com/Tatsh/instagram-archiver/actions/workflows/qa.yml)
|
|
38
38
|
[](https://github.com/Tatsh/instagram-archiver/actions/workflows/tests.yml)
|
|
39
39
|
[](https://coveralls.io/github/Tatsh/instagram-archiver?branch=master)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://pypi.org/project/instagram-archiver/)
|
|
5
5
|
[](https://github.com/Tatsh/instagram-archiver/tags)
|
|
6
6
|
[](https://github.com/Tatsh/instagram-archiver/blob/master/LICENSE.txt)
|
|
7
|
-
[](https://img.shields.io/github/commits-since/Tatsh/instagram-archiver/v0.3.2/master)](https://github.com/Tatsh/instagram-archiver/compare/v0.3.2...master)
|
|
8
8
|
[](https://github.com/Tatsh/instagram-archiver/actions/workflows/qa.yml)
|
|
9
9
|
[](https://github.com/Tatsh/instagram-archiver/actions/workflows/tests.yml)
|
|
10
10
|
[](https://coveralls.io/github/Tatsh/instagram-archiver?branch=master)
|
|
@@ -116,22 +116,26 @@ class ProfileScraper(SaveCommentsCheckDisabledMixin, InstagramClient):
|
|
|
116
116
|
r = self.get_json('https://i.instagram.com/api/v1/users/web_profile_info/',
|
|
117
117
|
params={'username': self._username},
|
|
118
118
|
cast_to=WebProfileInfo)
|
|
119
|
-
|
|
120
|
-
json.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
self.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
119
|
+
if 'data' in r:
|
|
120
|
+
with Path('web_profile_info.json').open('w', encoding='utf-8') as f:
|
|
121
|
+
json.dump(r, f, indent=2, sort_keys=True)
|
|
122
|
+
user_info = r['data']['user']
|
|
123
|
+
if not self.is_saved(user_info['profile_pic_url_hd']):
|
|
124
|
+
with Path('profile_pic.jpg').open('wb') as f:
|
|
125
|
+
f.writelines(
|
|
126
|
+
self.session.get(user_info['profile_pic_url_hd'],
|
|
127
|
+
stream=True).iter_content(chunk_size=512))
|
|
128
|
+
self.save_to_log(user_info['profile_pic_url_hd'])
|
|
129
|
+
try:
|
|
130
|
+
for item in self.highlights_tray(user_info['id'])['tray']:
|
|
131
|
+
self.add_video_url('https://www.instagram.com/stories/highlights/'
|
|
132
|
+
f'{item["id"].split(":")[-1]}/')
|
|
133
|
+
except HTTPError:
|
|
134
|
+
log.exception('Failed to get highlights data.')
|
|
135
|
+
self.save_edges(user_info['edge_owner_to_timeline_media']['edges'])
|
|
136
|
+
else:
|
|
137
|
+
log.warning(
|
|
138
|
+
'Failed to get user info. Profile information and image will not be saved.')
|
|
135
139
|
d = self.graphql_query(
|
|
136
140
|
{
|
|
137
141
|
'data': {
|
|
@@ -180,15 +184,15 @@ class ProfileScraper(SaveCommentsCheckDisabledMixin, InstagramClient):
|
|
|
180
184
|
with get_configured_yt_dlp() as ydl:
|
|
181
185
|
while self.video_urls and (url := self.video_urls.pop()):
|
|
182
186
|
if self.is_saved(url):
|
|
183
|
-
log.info('
|
|
187
|
+
log.info('%s is already saved.', url)
|
|
184
188
|
continue
|
|
185
189
|
if ydl.extract_info(url):
|
|
186
|
-
log.info('
|
|
190
|
+
log.info('Downloading video: %s', url)
|
|
187
191
|
self.save_to_log(url)
|
|
188
192
|
else:
|
|
189
193
|
self.failed_urls.add(url)
|
|
190
194
|
if self.failed_urls:
|
|
191
|
-
log.warning('Some
|
|
195
|
+
log.warning('Some URIs failed. Check failed.txt.')
|
|
192
196
|
with Path('failed.txt').open('w', encoding='utf-8') as f:
|
|
193
197
|
for url in self.failed_urls:
|
|
194
198
|
f.write(f'{url}\n')
|
|
@@ -27,9 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
27
27
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
28
28
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
29
29
|
..
|
|
30
|
-
.TH "INSTAGRAM-ARCHIVER" "1" "May 12, 2025" "0.3.
|
|
30
|
+
.TH "INSTAGRAM-ARCHIVER" "1" "May 12, 2025" "0.3.2" "instagram-archiver"
|
|
31
31
|
.SH NAME
|
|
32
|
-
instagram-archiver \- instagram-archiver v0.3.
|
|
32
|
+
instagram-archiver \- instagram-archiver v0.3.2
|
|
33
33
|
.SH COMMANDS
|
|
34
34
|
.SS instagram\-archiver
|
|
35
35
|
.sp
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|