Package: pyheadspace
headspace-cliCommand line script to download headspace packs, singles or everyday meditation.👶 Dependencies🛠️ Installation⚙️ Setup🚀 Usage👶 DependenciesPython 3.7 or higher🛠️ Installationpipinstall--upgradepyheadspaceIf installing usingpip install --user, you must add the user-level bin directory to your PATH environment variable in order to use pyheadspace. If you are using a Unix derivative (FreeBSD, GNU / Linux, OS X), you can achieve this by usingexport PATH="$HOME/.local/bin:$PATH"command.OR install withpipxpipxinstallpyheadspaceThis tool is only meant for personal use. Do not use this for piracy!⚙️ SetupRun and enter login credentials.headspaceloginIf you use other form of authentication like google(do not have username and password), you could followthese steps🚀 UsageDownload all packs at once# Download all packs with each session of duration 15 minutesheadspacepack--all--duration15# Download all packs with session duration of 10 & 20 minutesheadspacepack--all--duration10--duration15Exclude specific packs from downloading:To exclude specific packs from downloading use--excludeoption.It expects location of text file for links of packs to exclude downloading. Every link should be on separate line.links.txt:https://my.headspace.com/modes/meditate/content/154
https://my.headspace.com/modes/meditate/content/150commandheadspacepacks--all--excludelinks.txtThis would download all packs except the ones inlinks.txtfileDownloading specific packheadspacepack<PACK_URL>[Options]BASIC USAGE# Download with all session of duration 15 minutesheadspacepackhttps://my.headspace.com/modes/meditate/content/151--duration15# Download sessions of multiple durationheadspacepackhttps://my.headspace.com/modes/meditate/content/151-d20-d15Options:--idINTEGERIDofvideo.
-d,--durationTEXTDurationorlistofduration
--no_meditationOnlydownloadmeditationsessionwithouttechniquesvideos.
--no_techniquesOnlydownloadtechniquesandnotmeditationsessions.
--outTEXTDownloaddirectory
--allDownloadsallheadspacepacks.
-e,--excludeTEXTUsewith`--all`flag.Locationoftextfilewithlinksofpackstoexcludedownloading.Everylinkshouldbeonseparateline.
--helpShowthismessageandexit.Download single sessionheadspacedownload<SESSION_URL>[options]BASIC USAGE$headspacedownloadhttps://my.headspace.com/player/204?authorId=1&contentId=151&contentType=COURSE&mode=meditate&trackingName=Course&startIndex=1--duration15Options:--outTEXTDownloaddirectory.
--idINTEGERIDofthevideo.NotrequiredifURLisprovided.
-d,--durationDurationorlistofduration
--helpShowthismessageandexit.Download everyday meditationsheadspaceeveryday[OPTIONS]BASIC USAGE# Downloads today's meditationheadspaceeveryday# Download everyday meditation of specific time period.# DATE FORMAT: yyyy-mm-ddheadspaceeveryday--from2021-03-01--to2021-03-20Options--from TEXT          Start download from specific date. DATE-FORMAT=>yyyy-
                    mm-dd
--to TEXT            Download till a specific date. DATE-FORMAT=>yyyy-mm-dd
-d, --duration TEXT  Duration or list of duration
--out TEXT           Download directory
--help               Show this message and exit.Changing Language PreferenceBy default the language is set to english. You could change to other languages supported by headspace.
Other Languages:de-DEes-ESfr-FRpt-BRTo change the language modify the environment variableHEADSPACE_LANGand set the value to the langauge code.For fish/bash shellexport HEADSPACE_LANG="fr-FR"Powershell$env:DESIRED_LANGUAGE="fr-FR"If you encounter any issue or bug, open a new issue ongithub