Skip to content
This repository was archived by the owner on Dec 30, 2018. It is now read-only.

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offliberate

Python version support: 3 License: MIT

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.

Installation

pip3 install offliberate

Usage

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 🔗

Examples

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

Tidbits

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?

Examples

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)

To-Do

  • Windows support
    Windows works if '-p' is specified.
    (Basically all fancy output has to be disabled)

About

Scrape media right from your terminal with the help of Offliberty.

Topics

Resources

Stars

28 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages