YouTube video iframe generator
Project description
YT iframe Generator
yt_iframe is a python module which can convert a youtube video link into an embeddable iframe. In order to use this module, install it through your terminal.
foo@bar:~$ pip install yt-iframe
# Import statement
from yt_iframe import yt
Using the module
yt.video()
The video() function takes the youtube video link as a string argument. It returns the iframe as a string.
url = 'https://www.youtube.com/watch?v=UzIQOQGKeyI'
iframe = yt.video(url)
yt.channel()
The channel() function takes a youtube channel link as a string argument. It returns a list of youtube video links.
url = 'https://www.youtube.com/user/ouramazingspace'
videolist = yt.channel(url)
yt.channelDict()
the channelDict() function takes a youtube channel link as a string argument. It returns a nested dictionary containing the name of the channel, and video titles.
url = 'https://www.youtube.com/user/ouramazingspace'
videolist = yt.channelDict(url)
videolist['name'] # Name of channel
videolist['videos'] # Nested dictionary. Key = video title, Value = link
yt.getFrames()
The getFrames() function takes a list of youtube videos as a list argument. It returns a list of iframes.
url = 'https://www.youtube.com/user/ouramazingspace'
iframes = yt.getFrames(yt.channel(url))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file yt_iframe-1.0.0.tar.gz
.
File metadata
- Download URL: yt_iframe-1.0.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bedb63665f79fcd65fd2d364d787bea912c425664b7c5d14dfa30a3efb9c337 |
|
MD5 | ea25e4ce8e20a976dff9c66c4a687870 |
|
BLAKE2b-256 | ed25a550be466094c161596573fec53ec264c0df11cafb3e071f5b62f0030eb5 |