# Path: lib/scraper/bsoup.py
# def to_soup(html_source, parser='html.parser'):
# def prettify(soup):
# def get_links(soup, base_url=None):
# def get_images(soup, base_url=None):
# def make_links_absolute(soup, base_url):


import sys
import requests
from urllib.parse import urlencode
from lib.scraper import bsoup as bs
#!/usr/bin/env python3

"""
a simple scraper for http://sloganmaker.com/sloganmaker.php
"""





BASE = 'http://sloganmaker.com/sloganmaker.php?'


def get_slogan(word, times=1):
    assert 1 <= times <= 10     # be nice with the server
    #
    li = []
    url = BASE + urlencode({'user': word})
    for _ in range(times):
        text = requests.get(url).text

# Path: lib/scraper/bsoup.py
# def to_soup(html_source, parser='html.parser'):
# def prettify(soup):
# def get_links(soup, base_url=None):
# def get_images(soup, base_url=None):
# def make_links_absolute(soup, base_url):


# Path: slogan.py
import sys
import requests
from urllib.parse import urlencode
from lib.scraper import bsoup as bs

#!/usr/bin/env python3

"""
a simple scraper for http://sloganmaker.com/sloganmaker.php
"""





BASE = 'http://sloganmaker.com/sloganmaker.php?'


def get_slogan(word, times=1):
    assert 1 <= times <= 10     # be nice with the server
    #
    li = []
    url = BASE + urlencode({'user': word})
    for _ in range(times):
        text = requests.get(url).text

        soup = bs.to_soup(text)