from scraper.utils.browser import Firefox
from scraper.utils.resolve import Resolver
import base64

class Direct(Resolver):
    def __init__(self):
        pass

    def grab(self, url):
        if url.startswith("base64:"):
            url = base64.b64decode(url.split("base64:")[1].encode()).decode()

        return url, Firefox().headers