{ "info": { "author": "dbeley", "author_email": "dbeley@protonmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3" ], "description": "# ypc : youtube_playlist_converter\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8007d6fb15334ef485aadd64e133aa97)](https://app.codacy.com/app/dbeley/ypc?utm_source=github.com&utm_medium=referral&utm_content=dbeley/ypc&utm_campaign=Badge_Grade_Dashboard)\n[![Build Status](https://travis-ci.com/dbeley/ypc.svg?branch=master)](https://travis-ci.com/dbeley/ypc)\n[![codecov](https://codecov.io/gh/dbeley/ypc/branch/master/graph/badge.svg)](https://codecov.io/gh/dbeley/ypc)\n\nThis python utility allows the conversion of spotify/deezer/text albums/playlists to youtube urls and/or audio/video files.\n\nIt supports spotify and deezer urls (album and playlist), as well as a list of terms to search (see below for some examples). \n\nIt also supports files containing several of the compatible search terms (one by line). Unfortunately, the mix of several types is not supported at this moment (spotify and deezer urls in the same file for example).\n\nIf you want to extract spotify albums/playlists, you need to set up a valid config.ini file with your spotify api client id and secret (go to [developer.spotify.com/dashboard/login](https://developer.spotify.com/dashboard/login) to create your own spotify application) and place it in the ~/.config/ypc/ directory (see the config_sample.ini file as an example).\n\n## Requirements\n\n- requests\n- spotipy\n- pandas\n- beautifulsoup4\n- youtube-dl\n- lxml\n- tqdm\n\n## Installation\n\n```\npip install ypc\n```\n\nIf you are an Archlinux user, you can install the AUR package [ypc-git](https://aur.archlinux.org/packages/ypc-git).\n\n### Installation in a virtualenv\n\n```\ngit clone https://github.com/dbeley/ypc\ncd ypc\npipenv install '-e .'\n```\n\n## Usage\n\n### Help\n\nShow the help :\n\n```\nypc -h\n```\n\n```\nusage: ypc [-h] [--debug] [-f FILE_NAME] [-su SPOTIFY_URL] [-du DEEZER_URL]\n [-sf SPOTIFY_FILE] [-df DEEZER_FILE] [-yf YOUTUBE_FILE]\n [-n EXPORT_FOLDER_NAME] [-v] [-a] [--no_search_youtube]\n [main_argument]\n\nConvert spotify/deezer/text albums/playlists to youtube urls or audio/video\nfiles.\n\npositional arguments:\n main_argument Any search terms allowed : search terms (quoted and\n separated by comma), deezer/spotify playlist/album\n urls (separated by comma) or filename containing\n search terms : deezer/spotify album/playlist urls (one\n by line) or youtube urls (one by line).\n\noptional arguments:\n -h, --help show this help message and exit\n --debug Display debugging information.\n -f FILE_NAME, --file_name FILE_NAME\n File containing the name of the songs (one search term\n by line).\n -su SPOTIFY_URL, --spotify_url SPOTIFY_URL\n Url of the spotify album/playlist urls (separated by\n comma).\n -du DEEZER_URL, --deezer_url DEEZER_URL\n Url of the deezer album/playlist urls (separated by\n comma).\n -sf SPOTIFY_FILE, --spotify_file SPOTIFY_FILE\n File containing the links of the spotify\n album/playlist urls (one by line).\n -df DEEZER_FILE, --deezer_file DEEZER_FILE\n File containing the links of the deezer album/playlist\n urls (one by line).\n -yf YOUTUBE_FILE, --youtube_file YOUTUBE_FILE\n File containing youtube urls (one by line). The file\n url_list_simple.csv exported by ypc is a good\n candidate.\n -n EXPORT_FOLDER_NAME, --export_folder_name EXPORT_FOLDER_NAME\n Name of the export. Used to name the exports folder.\n -v, --download_video Download the videos of the tracks found.\n -a, --download_audio Download the audio files of the tracks found.\n --no_search_youtube Doesn't search youtube urls. Use it with the\n -su/-du/-sf/-df flags if you want to export only the\n track names from the albums/playlists.\n```\n\n### Examples\n\n#### Simple Examples\n\nDownload videos for several songs :\n\n```\nypc \"u2 one,xtc general and majors,debussy la mer\" -v\n```\n\nDownload videos for several deezer playlists or albums using the name \"deezer_export\" as export folder :\n\n```\nypc \"DEEZER_PLAYLIST_URL1,DEEZER_ALBUM_URL2,...\" -v -n deezer_export\n```\n\nDownload audio and videos for each spotify playlists in the file spotify_playlists.txt (one by line) using the name \"spotify_export\" as export folder :\n\n```\nypc spotify_playlists.txt -a -v -n spotify_export\n```\n\nThe main ypc arguments you want are -a (download audio), -v (download video) and -n (set the name of the export folder, default : ypc_export).\n\nIf you don't set the `-a` and the `-v` flags, the script will still extract youtube urls for the search and write the csv files (see \"Exported files\").\n\nYou can set the medias (an url, a list of search terms, a file containing spotify playlist and/or album urls, etc.) to download without any argument and ypc will guess which kind of media it is (as show above), or use explicit argument, as shown in the examples below.\n\n#### With spotify urls\n\nDownload the audio of a spotify playlist :\n\n```\nypc SPOTIFY_PLAYLIST_URL -a\nypc -su SPOTIFY_PLAYLIST_URL -a\n```\n\nDownload the videos found on youtube for the tracks of the spotify album urls contained in a file (one by line) :\n\n```\nypc spotify_list_albums.txt -v\nypc -sf spotify_list_albums.txt -v\n```\n\n#### With deezer urls\n\nDownload videos for several deezer playlists using the name \"deezer_export\" as export folder :\n\n```\nypc DEEZER_PLAYLIST_URL1,DEEZER_PLAYLIST_URL2 -v -n deezer_export\nypc -du DEEZER_PLAYLIST_URL1,DEEZER_PLAYLIST_URL2 -v -n deezer_export\n```\n\nDownload the videos founds on youtube from a file containing deezer playlists (one by line) :\n\n```\nypc deezer_list_playlists.txt -v\nypc -df deezer_list_playlists.txt -v\n```\n\n#### With youtube urls\n\nDownload the videos from a file containing youtube urls (one by line) :\n\n```\nypc youtube_urls.txt -v\nypc -yf youtube_urls.txt -v\n```\n\nExtract youtube urls for several songs with song_export as export folder :\n\n```\nypc \"u2 one,xtc general and majors,debussy la mer\" -n song_export\n```\n\nDownload the videos from the exported file (works with every `urls_list.csv` exported by ypc) :\n\n```\nypc song_export/urls_list.csv -v -n video_export\n```\n\n#### With search terms\n\nDownload audio files for several songs (no explicit argument available) :\n\n```\nypc \"u2 one,xtc general and majors,debussy la mer\" -a\n```\n\nGiven a file sample_file.csv :\n\n```\nartist1 - title1\nartist1 - title2\nartist2 - title1\nany search term\n```\n\nDownload the audio files for the tracks/search terms in the sample csv file above :\n\n```\nypc sample_file.csv -a\nypc -f sample_file.csv -a\n```\n\nDownload the videos for the tracks/search terms in the sample csv file above :\n\n```\nypc sample_file.csv -v\nypc -f sample_file.csv -v\n```\n\n### Exported files\n\nThe script will export several files in the export folder (you can set it with the `-n/--export_folder_name` flag, default : ypc_export) :\n\n- tracklist.csv : File containing the name of the songs and the youtube urls (CSV, separator : tabulation `\\t`).\n- urls_list.csv : File containing the list of extracted youtube urls (one by line). You can use that file with ypc (see Examples - With youtube urls)\n- Audio : Folder containing the audio files (if `-a`)\n- Videos : Folder containing the video files (if `-v`)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dbeley/ypc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ypc", "package_url": "https://pypi.org/project/ypc/", "platform": "", "project_url": "https://pypi.org/project/ypc/", "project_urls": { "Homepage": "https://github.com/dbeley/ypc" }, "release_url": "https://pypi.org/project/ypc/1.4.1/", "requires_dist": null, "requires_python": "", "summary": "Convert spotify/deezer/text playlists to youtube urls or audio/video files", "version": "1.4.1" }, "last_serial": 5962337, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "912dfd713fb4d223e97380ac483d45a6", "sha256": "fc41193a5aa7b8ebeb0d881cdd07f0a00929e20a0d4831c99f5679b8dfa67672" }, "downloads": -1, "filename": "ypc-1.0.tar.gz", "has_sig": false, "md5_digest": "912dfd713fb4d223e97380ac483d45a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4869, "upload_time": "2019-05-21T20:35:09", "url": "https://files.pythonhosted.org/packages/03/60/63d2ede9e5e2b65e9d887973a5505c67d1e4be9cdfe0246440b11f266ca7/ypc-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "658c13f605e1d57d025474d1b6e59cd2", "sha256": "604a15a693c470c675b179be6d431c2a3a352bfac40b2cd2a99befed740bc3ad" }, "downloads": -1, "filename": "ypc-1.1.tar.gz", "has_sig": false, "md5_digest": "658c13f605e1d57d025474d1b6e59cd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6234, "upload_time": "2019-05-22T22:09:08", "url": "https://files.pythonhosted.org/packages/86/32/013302a7be35933cbb063c69fcb0f30f99f4e1b9888e322e7cb529f0a66b/ypc-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "5d772ddea3ffb5d8231b89ce01ab1f38", "sha256": "50f67df8d7e4b28bd31dc556f5dd1977bc15c808b75664093dfbaf78dca30801" }, "downloads": -1, "filename": "ypc-1.2.tar.gz", "has_sig": false, "md5_digest": "5d772ddea3ffb5d8231b89ce01ab1f38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6713, "upload_time": "2019-05-23T19:25:38", "url": "https://files.pythonhosted.org/packages/49/83/f3aeb9a991021701ff4cd2fb3fb57217cfdc8d9e99aab2f8eee86df6341f/ypc-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "e9cec59fa6274322536a014c0167455c", "sha256": "e17fcb9f98af382438f82d6187ff72ff24ea61be044a94e293ce46812aad18ab" }, "downloads": -1, "filename": "ypc-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e9cec59fa6274322536a014c0167455c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7511, "upload_time": "2019-05-25T09:04:53", "url": "https://files.pythonhosted.org/packages/68/2c/faf1bf4692eec5fde728edf9e278eab462585e988d7b6419ae6293df12b7/ypc-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "154efcafa1d719f1f6d62ced1d9dac85", "sha256": "dd83e4612271c7bfa8d34e176144b190a3e496eec7f5b715694c013175969c87" }, "downloads": -1, "filename": "ypc-1.2.2.tar.gz", "has_sig": false, "md5_digest": "154efcafa1d719f1f6d62ced1d9dac85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7535, "upload_time": "2019-05-27T22:35:46", "url": "https://files.pythonhosted.org/packages/58/2e/79f19b5307a5ae7bb0280ce1778665afa274a47fb81e08b361a0ef5e9f5a/ypc-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "391b5beef8012a2899ce7d33c764d300", "sha256": "0144048e8ab12141a0e92c88799a7ad0e303a1f007e8c94af22bf5b3400c9967" }, "downloads": -1, "filename": "ypc-1.2.3.tar.gz", "has_sig": false, "md5_digest": "391b5beef8012a2899ce7d33c764d300", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7863, "upload_time": "2019-09-27T16:36:32", "url": "https://files.pythonhosted.org/packages/65/fa/5f392a92578c658d34eec44775fea64f006da8446997b7e25894d04a2d9e/ypc-1.2.3.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "93b665c1b7cd906d044cde38dd431419", "sha256": "c1f144ac1267804b4ac2a25621612822b8b6a636c162de31511c19505919e163" }, "downloads": -1, "filename": "ypc-1.3.0.tar.gz", "has_sig": false, "md5_digest": "93b665c1b7cd906d044cde38dd431419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9755, "upload_time": "2019-10-02T23:02:36", "url": "https://files.pythonhosted.org/packages/a3/d2/7d3c8d133fd589f2c60c1f9c8ac9d3d95ce60c9ee80681281a51a50555a7/ypc-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "d0dd175fcc896dbbda950cd937086e11", "sha256": "d9e7d1343bb078adb3fb7ff768607c90377da44a4d71345e072445d44b0b82e8" }, "downloads": -1, "filename": "ypc-1.3.1.tar.gz", "has_sig": false, "md5_digest": "d0dd175fcc896dbbda950cd937086e11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9808, "upload_time": "2019-10-11T10:01:22", "url": "https://files.pythonhosted.org/packages/da/b0/944f27dc418a85710430d2a59880ef70ed5d1037c005fdce47f72b936e48/ypc-1.3.1.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "0a2988b4f1daef2ac7e1841a7b18cf81", "sha256": "145909a37119b0a7a0e28e7317d826a03ea69f6a50b738c7adc73e47a4707e5a" }, "downloads": -1, "filename": "ypc-1.4.0.tar.gz", "has_sig": false, "md5_digest": "0a2988b4f1daef2ac7e1841a7b18cf81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10556, "upload_time": "2019-10-11T16:45:49", "url": "https://files.pythonhosted.org/packages/24/94/54da323d8aa23e1f3d927e22056e7c043b2241938f9f4834b420397f09c0/ypc-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "a74f6e792d512a9c04f830463d0c8a53", "sha256": "fc02f7af8e8c0901bda1151240b91fba6b0207a1a487da4379d20e3a87ce9924" }, "downloads": -1, "filename": "ypc-1.4.1.tar.gz", "has_sig": false, "md5_digest": "a74f6e792d512a9c04f830463d0c8a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10417, "upload_time": "2019-10-11T23:51:36", "url": "https://files.pythonhosted.org/packages/7d/25/2e709efc21aea502a8f91e60e5fb820486c993f1ab97d479be23e80a91f3/ypc-1.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a74f6e792d512a9c04f830463d0c8a53", "sha256": "fc02f7af8e8c0901bda1151240b91fba6b0207a1a487da4379d20e3a87ce9924" }, "downloads": -1, "filename": "ypc-1.4.1.tar.gz", "has_sig": false, "md5_digest": "a74f6e792d512a9c04f830463d0c8a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10417, "upload_time": "2019-10-11T23:51:36", "url": "https://files.pythonhosted.org/packages/7d/25/2e709efc21aea502a8f91e60e5fb820486c993f1ab97d479be23e80a91f3/ypc-1.4.1.tar.gz" } ] }