Skip to main content

A Wrapper for Hermicraft Video API

Project description

Hermitcraft Video API

This is a python wrapper for the Hermitcraft.com api, that supports retrieving data for hermits and their videos.

The Site was created by hypnotised, and the api is used within the site to get the latest videos and see when hermits are live. This uses those api endpoints allowing us to get the data that the site uses.

Getting started

Go ahead and import the library.

import hermitcraftvideos

Next, we get a hermit from the api. Let's use Xisumavoid for this example.

hermit = hermitcraftvideos.getHermit("xisumavoid")

Make sure that you use the right name. It needs to be the EXACT channel name in the youtube URL in lower case. Example: Mumbo --> https://www.youtube.com/user/ThatMumboJumbo --> thatmumbojumbo

How we have our hermit from the api, we can find out data.

Such as a profile picture

print(hermit.picture) #https://yt3.ggpht.com/-x5tq4dTokyM/AAAAAAAAAAI/AAAAAAAAAAA/x4s30KOqUVA/s88-c-k-no/photo.jpg

Or we can find out a twitter:

print("@{} - {}".format(hermit.twitter.name,hermit.twitter.url)) #@xisumavoid - https://twitter.com/xisumavoid

Or better, if they are live on youtube, twitch or mixer(beam)

print(hermit.youtube.live) #False
print(hermit.twitch.live) #True
print(hermit.mixer.live) #False

We can also get videos!

videos = hermit.getVideos()

You can get simple data from the video

video = videos[0]
print(video.title) #Hermitcraft VI 712 Already Its The End!

And Some handy data

print("video is {} mins long".format(video.duration_time)) #video is 22:49 mins long
print("uploaded {}".format(video.uploaded_time)) #uploaded 7 hours ago 

Oooooh. Statistics

print(video.views) #44430
print(video.likes) # 2785

Oooooooooooooooooooooooooooooooooooooh. Updated Statistics

video.update()
print(video.views) #44440
print(video.likes) # 2790

And That's Mostly it. You can also get a jumble of videos with

hermitcraftvideos.getLatestVideos()

API Reference

Soon!

Project details


Download files

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

Source Distribution

hermitcraftvideos-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermitcraftvideos-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file hermitcraftvideos-0.1.1.tar.gz.

File metadata

File hashes

Hashes for hermitcraftvideos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 26f153e309de1090cde3858cf9caa283b31616a1e302f1b997079b0147195ee4
MD5 62350d770d19af66b6fbbecc02fa2ee8
BLAKE2b-256 893e99f45902d61bac972def272455b087cb15b2249b8e6bf1a495f7438ed726

See more details on using hashes here.

File details

Details for the file hermitcraftvideos-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hermitcraftvideos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49e96945ce52f15741b9d5c8e6728ab269a8820c9704b72fcbbdd06723c509e3
MD5 23f0fc6f94925b83a1ac18c1aa7b7201
BLAKE2b-256 673903d7c9ea6dc100155ac5fad39b6c3c11466ade78385d5e5eeae798728c13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page