Skip to main content

Accesses to radiko API, gets media playlist URL and built header for HTTP request to its URL.

Project description

radiko playlist

Test Test Coverage Maintainability Updates Python versions Twitter URL

Accesses to radiko API, gets media playlist URL and built header for HTTP request to its URL.

Features

This is light weight library for interacting with radiko API to get informations to access to media playlist. We can find various useages by integrating with other libraries.

Example

Following example requires additional installations:

Record Live

import time

import ffmpeg

from radikoplaylist import MasterPlaylistClient, LiveMasterPlaylistRequest

master_playlist_request = LiveMasterPlaylistRequest("FMT")
master_playlist = MasterPlaylistClient.get(master_playlist_request, area_id="JP13")

stream = ffmpeg.input(
    master_playlist.media_playlist_url,
    headers=master_playlist.headers,
    copytb='1'
)
stream = ffmpeg.output(stream, "./record.aac", f='mp4', c='copy')

# @see https://github.com/kkroening/ffmpeg-python/issues/162#issuecomment-571820244
popen = stream.run_async(pipe_stdin=True)
recnording_minute = 30
time.sleep(minute * 60)
popen.communicate(str.encode("q"))
time.sleep(3)
popen.terminate()

Record Time Free

import ffmpeg

from radikoplaylist import MasterPlaylistClient, TimeFreeMasterPlaylistRequest

master_playlist_request = TimeFreeMasterPlaylistRequest(
    "NACK5", 20200529210000, 20200529230000
)
master_playlist = MasterPlaylistClient.get(master_playlist_request, area_id="JP13")

stream = ffmpeg.input(
    master_playlist.media_playlist_url,
    headers=master_playlist.headers,
    copytb='1'
)
stream = ffmpeg.output(stream, "./record.aac", f='mp4', c='copy')
ffmpeg.run(stream)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for radikoplaylist, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size radikoplaylist-1.0.1-py3-none-any.whl (8.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size radikoplaylist-1.0.1.tar.gz (13.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page