Scrape media right from your terminal with the help of Offliberty.
Offliberate allows you to harness the power of Offliberty right from your terminal.
If the Internet bus visits your village only once a week or your grandma doesn't let you use Internet
more than 1 hour a day - Offliberty is for you.
Offliberty can scrape media from sites such as YouTube, SoundCloud and bandcamp.
pip3 install offliberate
Piping into Offliberate
Parameter | Short | Description | |
---|---|---|---|
--audio | -a | Download audio | ? |
--video | -v | Download video | ? |
--pretty | -p | Make Offliberate bland and boring | ? |
--download-location | Where should stuff go? | ⬇ | |
--no-download | Only resolve download links | ? |
Download a very special song (already escaped for your convenience):
offliberate https://www.youtube.com/watch\?v\=dQw4w9WgXcQ
Download the video of said song:
offliberate -v https://www.youtube.com/watch\?v\=dQw4w9WgXcQ
Download the audio and video of this absolute masterpiece:
offliberate -v -a https://www.youtube.com/watch\?v\=dQw4w9WgXcQ
Offliberate can also be used as a library.
request(url, callback=None, audio=True, video=False)
url
: The url that should be resolved.callback
: Run asynchronously if a callback method is provided.audio
: Should audio be resolved?video
: Should video be resolved?Synchronous:
from Offliberate import request
container = request("https://www.youtube.com/watch?v=le0BLAEO93g", audio=True,
video=True)
print(container.audio)
print(container.video)
print(container.url)
Asynchronous:
from Offliberate import request
def callback(container):
print(container.audio)
print(container.video)
print(container.url)
request("https://www.youtube.com/watch?v=le0BLAEO93g", audio=True,
video=True, callback=callback)