https://github.com/n0str/vk-dumper
Simple and dummy script for vk messages dumping via VK API
https://github.com/n0str/vk-dumper
Last synced: about 1 year ago
JSON representation
Simple and dummy script for vk messages dumping via VK API
- Host: GitHub
- URL: https://github.com/n0str/vk-dumper
- Owner: n0str
- Created: 2017-07-15T16:29:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:02:05.000Z (over 3 years ago)
- Last Synced: 2025-02-04T15:49:52.059Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# General
Script dumps all your VK messages. It is so dummy, that's why you have to perform some preparations to use it.
1. Install python3 with 'requests' module. Or run `pip install -r requirements.txt`
2. Install mongo and provide connection settings to the line: client = MongoClient('localhost', 27017)
You can also run it with docker by : `docker run --name vk-dumper-mongo -d -p 27017:27017 -v /path/to/empty/directory/for/mongo:/tmp/mongo -e DATA_DIR=/tmp/mongo mongo`
3. Create Standalone application in VK and copy App-id from settings.
4. Obtain token manually via : `https://oauth.vk.com/authorize?client_id=&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=messages&response_type=token&v=5.67&state=1`
You can see access token in your browser's address field after #.
5. Copy access token to the config.py file (rename config.py.sample into config.py).
6. Run `python main.py`
7. Don't forget to export results with :
- `mongoexport --db vk --collection messages --out messages.json`
- `mongoexport --db vk --collection users --out users.json`
- `mongoexport --db vk --collection docs --out docs.json`
- `mongoexport --db vk --collection photos --out photos.json`
- `mongoexport --db vk --collection links --out links.json`
Enjoy.
# Setup
Change hardcoded parameter out=1 to out=0 if you wanna get incoming messages.