Script posts one random comics from xkcd.com to VK community.
-
Create a community in VK and get your GROUP_ID
-
Create an app in VK
- Then press "manage" on your app and you'll see the "client_id" at the end of URL:
https://vk.com/editapp?id=
11111111
- Then press "manage" on your app and you'll see the "client_id" at the end of URL:
https://vk.com/editapp?id=
-
Get your access_token, using Implicit Flow procedure.
Do not use parameter redirect_uri in request.
Parameter scope: scope=photos,groups,wall,offline.
-
Create environment variables in "your_project_folder\ .env" file:
- VK_GROUP_ID= group_id from p.1 above.
- VK_CLIENT_ID= client_id from p.2 above.
- VK_ACCESS_TOKEN= access_token from p.3 above.
-
Python3 should be already installed.
Then use
pip
(orpip3
, if there is a conflict with Python2) to install dependencies:
pip install -r requirements.txt
-> packages, listed in requirements, should be successfully installed.
Run the script:
python main.py
- Inspired by Devman