Exemplo n.º 1
0
def social_pull_right():
    '''GET and DISPLAY all available social media with its links (href) "class=social pull-right"'''
    items=[]
    for e in soup.find_all("div",{"class":"social pull-right"}):
        for a in e.find_all("a"):
            items.append(a['href'])
    print(*(listprinting(items)))
Exemplo n.º 2
0
def leftbar():
    '''DISPLAY from "leftbar" all <li> items:'''
    items=[]
    for e in soup.find_all("div",{"class":"leftbar"}):
        for li in e.find_all("li"):
            items.append((li.text).strip(" "))
    print(*(listprinting(items)))
Exemplo n.º 3
0
def topmenuitems():
    '''DISPLAY all items from "topmenu":'''
    items=[]
    for e in soup.find_all("div",{'id':'topmenu'}):
        for li in e.find_all("li"):
            items.append((li.text).strip(" "))
    print(*(listprinting(items)))
Exemplo n.º 4
0
def meta_title_description():
    '''GET following <meta>: "title", "description" ("og")'''
    items = []
    for e in soup.find_all("meta", {'property': 'og:title'}):
        items.append(e['content'])
    for e in soup.find_all("meta", {'property': 'og:description'}):
        items.append(e['content'])
    print(*listprinting(items))
Exemplo n.º 5
0
def all_estudios():
    '''DISPLAY ALL "Estudios"'''
    items=[]
    for e in soup.find_all("div",{"class":"estudios"}):
        items.append((e.text).strip(" "))
    print(*(listprinting(items)))