import requests
from bs4 import BeautifulSoup


def docs_from_url(url, search_cfg):
    """
    extract html elements from url satisfying  a config dict.
    """
    data = requests.get(url).text
    docs = BeautifulSoup(data, "lxml").find_all(**search_cfg)
    return docs