Configurable script to download images from VK bookmarks, user and group walls, and dialogs\chat rooms.
- Downloads images from different sources in different folders
- Uses upload date as an image name
- Has a progress bar and logging
- Can be gracefully shut down with
ctrl+C
- Asynchronous
At least Python 3.7 required.
Install dependencies with:
pip instal -r requirements.txt
You will need a VK API Token
You can get it here
I recommend reading about them tokens.
Create a file named .env
alongside main script main.py
.
In .env
add following line:
TOKEN=your_token_you_got_from_link_above
Run python main.py
, specifying where to donload from with parameters below
Flag | Desciption |
---|---|
--fave |
If set, images will be downloaded from current user bookmarks |
--wall |
List of wall identificators to download from. For example --wall id0 club420 fenekc |
--chat |
List of chat identificators to download from. For example --chat c1 12312 -1 c5 |
--path |
Specify path to download images to. By default downloads to ./data folder |
--offset |
Specify posts to start from while downloading from walls. --offset 100 0 500 means that first wall will start from post #100, second from the start and the third one from #500. |
--start-from |
Specify messages to start from while downloading from chats. For example --start-from 1753228/1 . You can see current message next to a progress bar |
--count |
Specify batch size - how many images to request from vk, and consequently, how many images to download at once |
python main.py --wall haalonean --fave --chat c50 c51