Exemplo n.º 1
0
def reviewtest(sites):
    Product = namedtuple("product", "website, pid, brand")
    Engine = namedtuple("Engine", "browser, s, e")
    RapidWrinkle = {
        "amazon": Product("amazon", "B004D2C57M", "Neutrogena"),
        "drugstore": Product("drugstore", "qxp344205", "Neutrogena"),
        "walmart": Product("walmart", "15747280", "Neutrogena"),
    }
    for i in sites:
        product = RapidWrinkle[i]
        t = timerstart()
        browser = "Chrome"
        s, e = class_chooser(product.website)
        engine = Engine(browser, s(), e())
        download(product, engine)
        timerend(t)
Exemplo n.º 2
0
# start the clock

t = timerstart()

# setup
browser = "Chrome"

# objects
Product = namedtuple("product", "website, pid, brand")
Engine = namedtuple("Engine", "browser, s, e")

# user input
website, pid = link_input()
brand = brand_input()
s, e = class_chooser(website)

# tuple instanciation
product = Product(website, pid, brand)
engine = Engine(browser, s(), e())

# execution
download(product, engine)

timerend(t)
# end the clock

## TESTING
sites = "walmart".split()