Skip to main content

youtube community alarm package

Project description

Youtube Community Alarm

  • Python3 interface for scheduling crontab to retrieve YouTube community posts and send notifications
  • Periodically check for new posts, and if any are found, send a notification to macOS.

Installing

install youtube-community-alarm

$ pip install youtube-community-alarm

Using

The default setting is to check for posts made within the last 10 minutes, using the corresponding cron expression */10 * * * *.
Here is the default usage:

>>> from youtubeCommunityAlarm import CrontabRegister

>>> channel_id = "@my_channel_id"
>>> cr = CrontabRegister(channel_id=channel_id)
>>> cr.register_crontab()

If you want to control the crontab settings, you can do so by passing the following arguments:

>>> from youtubeCommunityAlarm import CrontabRegister

>>> channel_id = "@my_channel_id"
# Check for new posts until those posted within the last 30 minutes using a cron expression "30 * * * *"
>>> cr = CrontabRegister(channel_id=channel_id, time_limit_for_checking_in_minutes=30, cron_expression="30 * * * *")
>>> cr.register_crontab()

Checking Crontab

Check if the crontab is registered by running the following command:

crontab -l

# Default
*/10 * * * * /usr/bin/python3 /path/youtube_community_alarm.py --channel_id @my_channel_id >> /path/log.log 2>&1

# Custom
30 * * * * /usr/bin/python3 /path/youtube_community_alarm.py --channel_id @my_channel_id --time_limit_for_checking_in_minutes 30 >> /path/log.log 2>&1

Crontab Error Case

If you encounter errors from the crontab, you can refer to this troubleshooting guide

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

youtube_community_alarm-0.0.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file youtube_community_alarm-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_community_alarm-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6d3ffc1b9b6c805e3a945d02499de17e058e520126de4b49e5371fed7bb5977
MD5 5e1912ca5f90e031077e1c9b76e18a2e
BLAKE2b-256 117731d095a30964f39e80b78142928e300ecfbb9a1f03db43990230fc1b2024

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