This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import warnings | |
import functools | |
def deprecated(function): | |
""" | |
This decorator which can be used to mark functions | |
as deprecated. It will result in a warning being emitted | |
when the function is used. | |
Args: | |
function: function: Function to be overridden! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from typing import Optional | |
def download_youtube_thumbnail(video_id: str, filename: Optional[str] = 'image.jpg') -> None: | |
""" | |
Method for downloading youtube thumbnail (if explicitly set by the | |
publisher) in maximum resolution. If filename is not passed then the | |
image will be saved as 'image.jpg'. | |
Args: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
import pandas as pd | |
from typing import Optional | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.common.exceptions import NoSuchElementException | |
chrome_options = Options() | |
chrome_options.add_argument('--headless') |