mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[vk] document 'offset', add '--range' support
This commit is contained in:
parent
67be377c77
commit
0e4e40c9d2
@ -4698,6 +4698,16 @@ Description
|
|||||||
or `cookies <extractor.*.cookies_>`__
|
or `cookies <extractor.*.cookies_>`__
|
||||||
|
|
||||||
|
|
||||||
|
extractor.vk.offset
|
||||||
|
-------------------
|
||||||
|
Type
|
||||||
|
``integer``
|
||||||
|
Default
|
||||||
|
``0``
|
||||||
|
Description
|
||||||
|
Custom ``offset`` starting value when paginating over image results.
|
||||||
|
|
||||||
|
|
||||||
extractor.vsco.include
|
extractor.vsco.include
|
||||||
----------------------
|
----------------------
|
||||||
Type
|
Type
|
||||||
|
@ -24,6 +24,13 @@ class VkExtractor(Extractor):
|
|||||||
root = "https://vk.com"
|
root = "https://vk.com"
|
||||||
request_interval = (0.5, 1.5)
|
request_interval = (0.5, 1.5)
|
||||||
|
|
||||||
|
def _init(self):
|
||||||
|
self.offset = text.parse_int(self.config("offset"))
|
||||||
|
|
||||||
|
def skip(self, num):
|
||||||
|
self.offset += num
|
||||||
|
return num
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
sub = re.compile(r"/imp[fg]/").sub
|
sub = re.compile(r"/imp[fg]/").sub
|
||||||
sizes = "wzyxrqpo"
|
sizes = "wzyxrqpo"
|
||||||
@ -75,7 +82,7 @@ class VkExtractor(Extractor):
|
|||||||
"al" : "1",
|
"al" : "1",
|
||||||
"direction": "1",
|
"direction": "1",
|
||||||
"list" : photos_id,
|
"list" : photos_id,
|
||||||
"offset" : self.config("offset") or 0,
|
"offset" : self.offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user