yt-monk


Nameyt-monk JSON
Version 0.1.1a2 PyPI version JSON
download
home_pagehttps://github.com/vojtikDortik/yt-monk
SummaryA simple Python package for downloading videos and playlists from YouTube
upload_time2024-10-03 18:30:02
maintainerNone
docs_urlNone
authorVojtech
requires_python>=3.6
licenseNone
keywords youtube downloader video playlist
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            



<!-- PROJECT LOGO -->

<div align="center">


<h1 align="center" style="font-size: 40px">YouTube Monk</h1>


  <p align="center">
    A YouTube video and playlist downloader made in Python.
    <br />
    <br />
    <a href="https://github.com/vojtikDortik/yt-monk/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
    -
    <a href="https://github.com/vojtikDortik/yt-monk/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
  </p>
</div>




<!-- GETTING STARTED -->
## Installing the library

To install the library from PyPi, just run this command:

```sh
pip install yt-monk
```





<!-- USAGE EXAMPLES -->
## Usage

Import the library and define the `downloader` object:
```python
import yt_monk

downloader = yt_monk.Downloader()
```

<br>

#### Setting the options:

You can set the options using keyword arguments when defining the object:

```python
downloader = yt_monk.Downloader(quality='720', codec='av1')
```

or you can set it using the `options.useCustom` function:

```python
downloader = yt_monk.Downloader()

downloader.options.useCustom(quality='720', codec='av1')
```

<br>

#### Here are all the options you can set:

codec -> `"h264"`, `"av1"`, `"vp9"`

quality -> `"max"`, `"2160"`, `"1440"`, `"1080"`, `"720"`, `"480"`, `"360"`, `"240"`, `"144"`

file_name -> this can be set to any valid filename. you can use placeholders: `<videoTitle>`, `<selectedQuality>`, `<selectedCodec>`

file_type -> the file type can be either `"video"` or `"audio"`

audio_format -> `"mp3"`, `"ogg"`, `"wav"`, `"opus"`

mute_audio -> `True` or `False`

overwrite_files -> this tells the program to overwrite existing files: `True` or `False`

overwrite_directories -> this tells the program to overwrite existing directories: `True` or `False`

download_directory -> the directory that the downloaded files will be saved to. you can use placeholder for default download directory like `C:\users\name\Downloads\` on windows: `<defaultDirectory>`

ask_for_input -> if enabled, the code will ask whether or not to overwrite a file or a directory: `True` or `False`

<br>

#### Using JSON options file:
Alternatively, you can use a json file to set the options. You can download an example [`options.json`](https://github.com/vojtikDortik/yt-monk/blob/master/yt_monk/options.json) file here. Then just tell the code to use the JSON file:

```python
downloader = yt_monk.Downloader(json_path=r'path/to/options.json')
```

or you can do it like this:

```python
downloader = yt_monk.Downloader()

downloader.options.useJson(json_path=r'path/to/options.json')
```

<br>

#### Downloading a video:


```python
video_url = 'https://www.youtube.com/watch?v=9bZkp7q19f0' 

downloader.downloadVideo(video_url)
```
<br>

#### Downloading a playlist:

```python
playlist_url = 'https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi' 

downloader.downloadPlaylist(playlist_url)
```










<!-- LICENSE -->
## License

Distributed under the MIT License. See [`LICENSE.txt`](https://github.com/vojtikDortik/yt-monk/blob/master/LICENSE.txt) for more information.






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vojtikDortik/yt-monk",
    "name": "yt-monk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "youtube downloader video playlist",
    "author": "Vojtech",
    "author_email": "officialvojta@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/06/b1/e2927fd05b9e885c1ed22f7c69044bfd005dc9bc87f2865d751abd34307e/yt_monk-0.1.1a2.tar.gz",
    "platform": null,
    "description": "\r\n\r\n\r\n\r\n<!-- PROJECT LOGO -->\r\n\r\n<div align=\"center\">\r\n\r\n\r\n<h1 align=\"center\" style=\"font-size: 40px\">YouTube Monk</h1>\r\n\r\n\r\n  <p align=\"center\">\r\n    A YouTube video and playlist downloader made in Python.\r\n    <br />\r\n    <br />\r\n    <a href=\"https://github.com/vojtikDortik/yt-monk/issues/new?labels=bug&template=bug-report---.md\">Report Bug</a>\r\n    -\r\n    <a href=\"https://github.com/vojtikDortik/yt-monk/issues/new?labels=enhancement&template=feature-request---.md\">Request Feature</a>\r\n  </p>\r\n</div>\r\n\r\n\r\n\r\n\r\n<!-- GETTING STARTED -->\r\n## Installing the library\r\n\r\nTo install the library from PyPi, just run this command:\r\n\r\n```sh\r\npip install yt-monk\r\n```\r\n\r\n\r\n\r\n\r\n\r\n<!-- USAGE EXAMPLES -->\r\n## Usage\r\n\r\nImport the library and define the `downloader` object:\r\n```python\r\nimport yt_monk\r\n\r\ndownloader = yt_monk.Downloader()\r\n```\r\n\r\n<br>\r\n\r\n#### Setting the options:\r\n\r\nYou can set the options using keyword arguments when defining the object:\r\n\r\n```python\r\ndownloader = yt_monk.Downloader(quality='720', codec='av1')\r\n```\r\n\r\nor you can set it using the `options.useCustom` function:\r\n\r\n```python\r\ndownloader = yt_monk.Downloader()\r\n\r\ndownloader.options.useCustom(quality='720', codec='av1')\r\n```\r\n\r\n<br>\r\n\r\n#### Here are all the options you can set:\r\n\r\ncodec -> `\"h264\"`, `\"av1\"`, `\"vp9\"`\r\n\r\nquality -> `\"max\"`, `\"2160\"`, `\"1440\"`, `\"1080\"`, `\"720\"`, `\"480\"`, `\"360\"`, `\"240\"`, `\"144\"`\r\n\r\nfile_name -> this can be set to any valid filename. you can use placeholders: `<videoTitle>`, `<selectedQuality>`, `<selectedCodec>`\r\n\r\nfile_type -> the file type can be either `\"video\"` or `\"audio\"`\r\n\r\naudio_format -> `\"mp3\"`, `\"ogg\"`, `\"wav\"`, `\"opus\"`\r\n\r\nmute_audio -> `True` or `False`\r\n\r\noverwrite_files -> this tells the program to overwrite existing files: `True` or `False`\r\n\r\noverwrite_directories -> this tells the program to overwrite existing directories: `True` or `False`\r\n\r\ndownload_directory -> the directory that the downloaded files will be saved to. you can use placeholder for default download directory like `C:\\users\\name\\Downloads\\` on windows: `<defaultDirectory>`\r\n\r\nask_for_input -> if enabled, the code will ask whether or not to overwrite a file or a directory: `True` or `False`\r\n\r\n<br>\r\n\r\n#### Using JSON options file:\r\nAlternatively, you can use a json file to set the options. You can download an example [`options.json`](https://github.com/vojtikDortik/yt-monk/blob/master/yt_monk/options.json) file here. Then just tell the code to use the JSON file:\r\n\r\n```python\r\ndownloader = yt_monk.Downloader(json_path=r'path/to/options.json')\r\n```\r\n\r\nor you can do it like this:\r\n\r\n```python\r\ndownloader = yt_monk.Downloader()\r\n\r\ndownloader.options.useJson(json_path=r'path/to/options.json')\r\n```\r\n\r\n<br>\r\n\r\n#### Downloading a video:\r\n\r\n\r\n```python\r\nvideo_url = 'https://www.youtube.com/watch?v=9bZkp7q19f0' \r\n\r\ndownloader.downloadVideo(video_url)\r\n```\r\n<br>\r\n\r\n#### Downloading a playlist:\r\n\r\n```python\r\nplaylist_url = 'https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi' \r\n\r\ndownloader.downloadPlaylist(playlist_url)\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- LICENSE -->\r\n## License\r\n\r\nDistributed under the MIT License. See [`LICENSE.txt`](https://github.com/vojtikDortik/yt-monk/blob/master/LICENSE.txt) for more information.\r\n\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple Python package for downloading videos and playlists from YouTube",
    "version": "0.1.1a2",
    "project_urls": {
        "Homepage": "https://github.com/vojtikDortik/yt-monk"
    },
    "split_keywords": [
        "youtube",
        "downloader",
        "video",
        "playlist"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e8ccf192a923dd9d82ffdbbd5be802fe36ee9ec95acca237c962a4488da03ef",
                "md5": "59bcb0768da1cdad88fd986726a27175",
                "sha256": "31b68b7d6d2bde3d0e5b11d594e5a1b613355dadb321478f02a842ed10436eda"
            },
            "downloads": -1,
            "filename": "yt_monk-0.1.1a2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "59bcb0768da1cdad88fd986726a27175",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8366,
            "upload_time": "2024-10-03T18:30:01",
            "upload_time_iso_8601": "2024-10-03T18:30:01.079172Z",
            "url": "https://files.pythonhosted.org/packages/6e/8c/cf192a923dd9d82ffdbbd5be802fe36ee9ec95acca237c962a4488da03ef/yt_monk-0.1.1a2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06b1e2927fd05b9e885c1ed22f7c69044bfd005dc9bc87f2865d751abd34307e",
                "md5": "42a35f6136fb99760da68a0d8f19e8ac",
                "sha256": "46b398cdae87e46d57ca55d8763655d5f83355b1fb6ce98a53e370e9b35f7162"
            },
            "downloads": -1,
            "filename": "yt_monk-0.1.1a2.tar.gz",
            "has_sig": false,
            "md5_digest": "42a35f6136fb99760da68a0d8f19e8ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11650,
            "upload_time": "2024-10-03T18:30:02",
            "upload_time_iso_8601": "2024-10-03T18:30:02.094821Z",
            "url": "https://files.pythonhosted.org/packages/06/b1/e2927fd05b9e885c1ed22f7c69044bfd005dc9bc87f2865d751abd34307e/yt_monk-0.1.1a2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-03 18:30:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vojtikDortik",
    "github_project": "yt-monk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "yt-monk"
}
        
Elapsed time: 0.38148s