Skip to content

Instantly share code, notes, and snippets.

@osharaki
Last active May 3, 2021 14:40
Show Gist options
  • Save osharaki/5938c6ccd898d51c4ab63ed848946858 to your computer and use it in GitHub Desktop.
Save osharaki/5938c6ccd898d51c4ab63ed848946858 to your computer and use it in GitHub Desktop.
Unogs API miner: imports, CLI init, and global vars (snippet 1/6)
import time # sleep operations
import requests # API requests
import json # storing data
import schedule # scheduling tasks
from _cli import init_cli # Command-line interface
default_buffer = 15 # default number of daily requests to be left unconsumed
default_time = "21:35" # script execution time defaults to quota reset time
args = init_cli(default_buffer, default_time) # initialize CLI
offset = args.offset # where to start collecting results
buffer = args.buffer
remaining_quota = buffer + 1
done = False # signals program to end
data = {"count": 0} # stores collected shows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment