def puppyplot(grown_up=False):
 from .external.six.moves.urllib.request import urlopen
 from IPython.display import HTML
 try:
  from bs4 import BeautifulSoup
  url = 'http://www.dailypuppy.com'
  if grown_up:
   url += '/dogs'
  html_doc = urlopen(url)
  soup = BeautifulSoup(html_doc)
  puppy = soup.find('div', {'class': 'daily_puppy'})
  return HTML(str(puppy.img))
 except ImportError:
  html = '<img  src="http://cdn-www.dailypuppy.com/dog-images/decker-the-nova-scotia-duck-tolling-retriever_72926_2013-11-04_w450.jpg" style="width:450px;"/>'
  return HTML(html)

def puppyplot ( grown_up = False ) : from . external . six . moves . urllib . request import urlopen from IPython . display import HTML try : from bs4 import BeautifulSoup url = 'http://www.dailypuppy.com' if grown_up : url += '/dogs' html_doc = urlopen ( url ) soup = BeautifulSoup ( html_doc ) puppy = soup . find ( 'div' , { 'class' : 'daily_puppy' } ) return HTML ( str ( puppy . img ) ) except ImportError : html = '<img  src="http://cdn-www.dailypuppy.com/dog-images/decker-the-nova-scotia-duck-tolling-retriever_72926_2013-11-04_w450.jpg" style="width:450px;"/>' return HTML ( html )
plot todays daily puppy .