Skip to content

Instantly share code, notes, and snippets.

View rohitkg98's full-sized avatar

Kaushal Rohit rohitkg98

View GitHub Profile
import os
import requests
import argparse
from html.parser import HTMLParser
parser = argparse.ArgumentParser(description='Input Link required.')
parser.add_argument('root_url', help='Link to the download page of Anime.')
def get_api_url(root_url):
@rohitkg98
rohitkg98 / daily_log.sh
Created January 3, 2020 17:27
A Script to maintain logs for everyday.
#!/bin/bash
# Check if DAILYLOG_DIR exists.
if [[ ! -z $DAILYLOG_DIR ]]; then
echo "Creating a new log at" "$DAILYLOG_DIR"
else
echo "Please enter directory to store logs:"
# tput is used to set colour and bold font - experimental turns all text to bold red
# trap 'echo -e $(tput bold)$(tput setaf 196)"NOTE: Path should be relative from ~/ i.e. home"' DEBUG
echo -e "NOTE: Path should be relative from ~/ i.e. home"
"""
Copyright 2020 Kaushal Rohit
Steps:
Install selenium and geckodriver.
Run the script as sudo with --setup argument:
$ sudo python --setup
Now, you have a service which runs at Boot and Shutdown.