vkimexp


Namevkimexp JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryVK messages/history export
upload_time2023-12-20 06:49:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords cli conversation export message vk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
   <!-- delameter/vkimexp -->
   <a href="##"><img align="left" src="https://s3.eu-north-1.amazonaws.com/dp2.dl/projects/delameter/vkimexp/logo.png" width="96" height="96"></a>
   <a href="##"><img align="center" src="https://s3.eu-north-1.amazonaws.com/dp2.dl/projects/delameter/vkimexp/label.png" width="200" height="64"></a>
</h1>
<div align="right">
  <a href="##"><img src="https://img.shields.io/badge/python-3.12-3776AB?logo=python&logoColor=white&labelColor=333333"></a>
  <a href="https://pepy.tech/project/vkimexp/"><img alt="Downloads" src="https://pepy.tech/badge/vkimexp"></a>
  <a href="https://pypi.org/project/vkimexp/"><img alt="PyPI" src="https://img.shields.io/pypi/v/vkimexp"></a>
  <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</div>
<br>

VK conversations exporter. 

## Motivation

Necessity to export VK conversations completely (with all attachments), not just the plain text (that's what official data export tool does).

## Features

- Suitable for regular dialogs as well as group conversations. 
- Supported attachment types: photos/images, voice messages, stickers.
- The history is exported in two formats: plain text and HTML with pagination. 
- All supported attachments are downloaded and referenced from HTML pages as local resources using relative paths, which allows to browse the exported history in offline mode (without Internet connection).
- Automatic authentication with `vk.com` using cookies loaded from a specified browser. Supported browsers (in a format accepted by `--browser` option): `chrome`, `firefox`, `safari`, `chromium`, `edge`, `opera`, `vivaldi`, `brave`.


## Installation

    pipx install vkimexp


## Usage

    vkimexp [OPTIONS] PEERS...

PEER should be VK ID of a person or a conversation in question (several PEERs can be provided at once). To find PEER of a person, open this page: https://vk.com/im and select the required dialog, and then his/her VK ID will appear in the address bar like this:

    https://vk.com/im?sel=1234567890                                               

where 1234567890 is a numeric ID in question. Use this number as PEER, e.g. for a person with VK ID 1234567890 the command is:

    vkimexp 1234567890                                                             

For group conversations there is no VK ID in the URL, as they are identified differently, by their index. Nevertheless, take this number (together with 'c'!) and provide it as is, the application will figure out VK ID of a conversation by itself:

    https://vk.com/im?sel=c195  =>  vkimexp c195                                   

### Options

    -b, --browser NAME  Browser to load cookies from (process is automatic). [default: chrome]
    -v, --verbose       Print more details.
    --help              Show this message and exit.


### Running

![example-run.png](example-run.png)

### Result 

![example-result.png](example-result.png)

## Troubleshooting

- #### Cannot authenticate the app

  Make sure you are logged into `vk.com` before launching the app. It's recommended to open or refresh `vk.com` page just before the start to ensure that cookies are fresh (if they expire, the export will fail to start). 

- #### Cannot authenticate the app (Gnome environment)

  Some system configurations require to set up an environment variable ```XDG_CURRENT_DESKTOP=GNOME``` for the app, so that the cookie extraction library could correctly identify the system keyring and, subsequently, to decrypt the cookies stored by browser. That can solve the cookie loading issue for Ubuntu 20, for example.

- #### Cannot authenticate the app with Google Chrome

  Try Firefox.

- #### Cannot authenticate the app with Firefox

  Try Google Chrome. 
 
  > Either of these almost certainly will work (and sometimes they both work  *\*gasp**).

- #### Cannot authenticate the app with any browser

  Run the application with `-v` option for more verbose output and see if the debugging information contains any unexpected exceptions or potenital clues. If all attempts to figure out what's going on are ineffective, feel free to [open an issue](issues).  Attaching the verbose output beforehand could simplify the task incredibly. 

## TODOs

- Option that disables cookie autoload and lets the user to specify all cookies manually.
- A way to customize output directory.
- `--color/--no-color` formatting control options.
- Parallel (multi-threaded) attachment downloads.
- Options to select which attachment types to process/ignore.
- GitHub Actions packaging automation.


## Changelog

### 1.2.0  <small><kbd>dec 23</kbd></small>

- Two extraction methods in a conjunction instead of one.
- Embedded CSS styles.

### 1.1.0  <small><kbd>dec 23</kbd></small>

- Full rewrite.

### 1.0.0  <small><kbd>oct 23</kbd></small>

- Prototype.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vkimexp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "cli,conversation,export,message,vk",
    "author": null,
    "author_email": "Aleksandr Shavykin <0.delameter@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e1/bb/97b9d95770df83e673d0112be43a08be4ce71e2edd5c5da39c14462da484/vkimexp-1.2.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n   <!-- delameter/vkimexp -->\n   <a href=\"##\"><img align=\"left\" src=\"https://s3.eu-north-1.amazonaws.com/dp2.dl/projects/delameter/vkimexp/logo.png\" width=\"96\" height=\"96\"></a>\n   <a href=\"##\"><img align=\"center\" src=\"https://s3.eu-north-1.amazonaws.com/dp2.dl/projects/delameter/vkimexp/label.png\" width=\"200\" height=\"64\"></a>\n</h1>\n<div align=\"right\">\n  <a href=\"##\"><img src=\"https://img.shields.io/badge/python-3.12-3776AB?logo=python&logoColor=white&labelColor=333333\"></a>\n  <a href=\"https://pepy.tech/project/vkimexp/\"><img alt=\"Downloads\" src=\"https://pepy.tech/badge/vkimexp\"></a>\n  <a href=\"https://pypi.org/project/vkimexp/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/vkimexp\"></a>\n  <a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n</div>\n<br>\n\nVK conversations exporter. \n\n## Motivation\n\nNecessity to export VK conversations completely (with all attachments), not just the plain text (that's what official data export tool does).\n\n## Features\n\n- Suitable for regular dialogs as well as group conversations. \n- Supported attachment types: photos/images, voice messages, stickers.\n- The history is exported in two formats: plain text and HTML with pagination. \n- All supported attachments are downloaded and referenced from HTML pages as local resources using relative paths, which allows to browse the exported history in offline mode (without Internet connection).\n- Automatic authentication with `vk.com` using cookies loaded from a specified browser. Supported browsers (in a format accepted by `--browser` option): `chrome`, `firefox`, `safari`, `chromium`, `edge`, `opera`, `vivaldi`, `brave`.\n\n\n## Installation\n\n    pipx install vkimexp\n\n\n## Usage\n\n    vkimexp [OPTIONS] PEERS...\n\nPEER should be VK ID of a person or a conversation in question (several PEERs can be provided at once). To find PEER of a person, open this page: https://vk.com/im and select the required dialog, and then his/her VK ID will appear in the address bar like this:\n\n    https://vk.com/im?sel=1234567890                                               \n\nwhere 1234567890 is a numeric ID in question. Use this number as PEER, e.g. for a person with VK ID 1234567890 the command is:\n\n    vkimexp 1234567890                                                             \n\nFor group conversations there is no VK ID in the URL, as they are identified differently, by their index. Nevertheless, take this number (together with 'c'!) and provide it as is, the application will figure out VK ID of a conversation by itself:\n\n    https://vk.com/im?sel=c195  =>  vkimexp c195                                   \n\n### Options\n\n    -b, --browser NAME  Browser to load cookies from (process is automatic). [default: chrome]\n    -v, --verbose       Print more details.\n    --help              Show this message and exit.\n\n\n### Running\n\n![example-run.png](example-run.png)\n\n### Result \n\n![example-result.png](example-result.png)\n\n## Troubleshooting\n\n- #### Cannot authenticate the app\n\n  Make sure you are logged into `vk.com` before launching the app. It's recommended to open or refresh `vk.com` page just before the start to ensure that cookies are fresh (if they expire, the export will fail to start). \n\n- #### Cannot authenticate the app (Gnome environment)\n\n  Some system configurations require to set up an environment variable ```XDG_CURRENT_DESKTOP=GNOME``` for the app, so that the cookie extraction library could correctly identify the system keyring and, subsequently, to decrypt the cookies stored by browser. That can solve the cookie loading issue for Ubuntu 20, for example.\n\n- #### Cannot authenticate the app with Google Chrome\n\n  Try Firefox.\n\n- #### Cannot authenticate the app with Firefox\n\n  Try Google Chrome. \n \n  > Either of these almost certainly will work (and sometimes they both work  *\\*gasp**).\n\n- #### Cannot authenticate the app with any browser\n\n  Run the application with `-v` option for more verbose output and see if the debugging information contains any unexpected exceptions or potenital clues. If all attempts to figure out what's going on are ineffective, feel free to [open an issue](issues).  Attaching the verbose output beforehand could simplify the task incredibly. \n\n## TODOs\n\n- Option that disables cookie autoload and lets the user to specify all cookies manually.\n- A way to customize output directory.\n- `--color/--no-color` formatting control options.\n- Parallel (multi-threaded) attachment downloads.\n- Options to select which attachment types to process/ignore.\n- GitHub Actions packaging automation.\n\n\n## Changelog\n\n### 1.2.0  <small><kbd>dec 23</kbd></small>\n\n- Two extraction methods in a conjunction instead of one.\n- Embedded CSS styles.\n\n### 1.1.0  <small><kbd>dec 23</kbd></small>\n\n- Full rewrite.\n\n### 1.0.0  <small><kbd>oct 23</kbd></small>\n\n- Prototype.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "VK messages/history export",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/delameter/vkimexp"
    },
    "split_keywords": [
        "cli",
        "conversation",
        "export",
        "message",
        "vk"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68c16e92068fc5ae70bda53c8961d4ab555af4874bb94b728b293cd4f21d8dea",
                "md5": "db8ff59cba73756cf951bc2ea77cd2ba",
                "sha256": "abe237fb3ec809a0ec0c039290db42254cd667f8ff344c3bc1ba43559ecd7fae"
            },
            "downloads": -1,
            "filename": "vkimexp-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db8ff59cba73756cf951bc2ea77cd2ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 19540,
            "upload_time": "2023-12-20T06:49:18",
            "upload_time_iso_8601": "2023-12-20T06:49:18.177460Z",
            "url": "https://files.pythonhosted.org/packages/68/c1/6e92068fc5ae70bda53c8961d4ab555af4874bb94b728b293cd4f21d8dea/vkimexp-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e1bb97b9d95770df83e673d0112be43a08be4ce71e2edd5c5da39c14462da484",
                "md5": "7d82672df5f2f253fc626c5c5d2c62d8",
                "sha256": "ecfc4d7af35614345fb6f7bb120b15671b705d153c801b9fee265e686bfef5af"
            },
            "downloads": -1,
            "filename": "vkimexp-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7d82672df5f2f253fc626c5c5d2c62d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 15010,
            "upload_time": "2023-12-20T06:49:20",
            "upload_time_iso_8601": "2023-12-20T06:49:20.493702Z",
            "url": "https://files.pythonhosted.org/packages/e1/bb/97b9d95770df83e673d0112be43a08be4ce71e2edd5c5da39c14462da484/vkimexp-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-20 06:49:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "delameter",
    "github_project": "vkimexp",
    "github_not_found": true,
    "lcname": "vkimexp"
}
        
Elapsed time: 0.15858s