@@ -1817,6 +1817,23 @@ Description
|
|||||||
It is possible to use ``"all"`` instead of listing all values separately.
|
It is possible to use ``"all"`` instead of listing all values separately.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.instagram.order-files
|
||||||
|
-------------------------------
|
||||||
|
Type
|
||||||
|
``string``
|
||||||
|
Default
|
||||||
|
``"asc"``
|
||||||
|
Description
|
||||||
|
Controls the order in which files of each post are returned.
|
||||||
|
|
||||||
|
* ``"asc"``: Same order as displayed in a post
|
||||||
|
* ``"desc"``: Reverse order as displayed in a post
|
||||||
|
* ``"reverse"``: Same as ``"desc"``
|
||||||
|
|
||||||
|
Note: This option does *not* affect ``{num}``.
|
||||||
|
To enumerate files in reverse order, use ``count - num + 1``.
|
||||||
|
|
||||||
|
|
||||||
extractor.instagram.previews
|
extractor.instagram.previews
|
||||||
----------------------------
|
----------------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ class InstagramExtractor(Extractor):
|
|||||||
previews = self.config("previews", False)
|
previews = self.config("previews", False)
|
||||||
video_headers = {"User-Agent": "Mozilla/5.0"}
|
video_headers = {"User-Agent": "Mozilla/5.0"}
|
||||||
|
|
||||||
|
order = self.config("order-files")
|
||||||
|
reverse = order[0] in ("r", "d") if order else False
|
||||||
|
|
||||||
for post in self.posts():
|
for post in self.posts():
|
||||||
|
|
||||||
if "__typename" in post:
|
if "__typename" in post:
|
||||||
@@ -71,6 +74,8 @@ class InstagramExtractor(Extractor):
|
|||||||
|
|
||||||
if "date" in post:
|
if "date" in post:
|
||||||
del post["date"]
|
del post["date"]
|
||||||
|
if reverse:
|
||||||
|
files.reverse()
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
file.update(post)
|
file.update(post)
|
||||||
|
|||||||
Reference in New Issue
Block a user