Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markovmx/dwl
Download saved vk.com photos or images from community walls. 26.05.24 tested and working.
https://github.com/markovmx/dwl
downloader vk vkontakte
Last synced: about 1 month ago
JSON representation
Download saved vk.com photos or images from community walls. 26.05.24 tested and working.
- Host: GitHub
- URL: https://github.com/markovmx/dwl
- Owner: markovmx
- Created: 2024-05-26T10:18:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-26T12:48:09.000Z (6 months ago)
- Last Synced: 2024-09-26T21:42:33.972Z (about 2 months ago)
- Topics: downloader, vk, vkontakte
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dwl
dwl is a Python script designed to download photos from vk.com social network either from community walls or from saved photos of a user.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/methhae/dwl.git
```2. Navigate to the project directory:
```bash
cd dwl
```3. Create and activate a virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate
```4. Install the required dependencies:
```bash
pip install -r requirements.txt
```## Getting VK Access Token
To use the `dwl` script, you need to obtain an access token from VK (VKontakte). Follow these steps to create a VK application and obtain the access token:
1. **Create VK Application:**
- Go to the [VK Developers](https://vk.com/dev) website and log in with your VK account credentials.
- Navigate to the [My Apps](https://vk.com/apps?act=manage) section.
- Click on the "Create App" button.2. **Fill in Application Details and Authorize:**
- Find aplication id.
- Visit: https://vkhost.github.io and grant access to your profile (correct type of access, in "Настройки" select "Группы", "Фотографии", "Видео", "Аудиозаписи")3. **Obtain Access Token:**
- After request you will redirect to similar path, here you find your access token:
https://oauth.vk.com/blank.html#access_token=YOUR_ACCESS_TOKEN_WILL_BE_HERE&expires_in=86400&user_id=8169943304. **Set Up `.env` File:**
- In the project directory, create a file named `.env` if it doesn't already exist.
- Open the `.env` file in a text editor.
- Add the following line, replacing `your_token` with the access token you obtained:
```
VK_ACCESS_TOKEN=your_token
```5. **Save and Run:**
- Save the `.env` file.
- Now you can run the `dwl` script using the instructions provided in the README.md file.By following these steps, you'll have successfully obtained the VK access token required for using the `dwl` script.
## Usage
Ensure you have created a `.env` file in the project directory with your VK access token in the format `VK_ACCESS_TOKEN=your_token`.
Run the script with the following command:
### Options:
- `--community`: This option indicates that you want to run the script in community mode. In community mode, the script will download photos from a VK community (group) based on the specified group name.
- `--saved`: This option indicates that you want to run the script in saved mode. In saved mode, the script will download photos from the saved photos album of your VK account.
- `--group_name `: This option is required when running the script in community mode (`--community`). It allows you to specify the name of the VK group from which you want to download photos. Replace `` with the actual name of the VK group.
### Examples:
1. **Download photos from a community:**
```bash
python dwl.py --community --group_name my_community
```This command will run the script in community mode and download photos from the VK community named `my_community`.
2. **Download saved photos from your VK account:**
```bash
python dwl.py --saved
```
This command will run the script in saved mode and download photos from the saved photos album of your VK account.