Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. from BeautifulSoup import BeautifulSoup
  2. import urllib2
  3.  
  4. url = 'http://www.sciencekids.co.nz/sciencefacts/animals/bird.html'
  5. page = urllib2.urlopen(url)
  6. soup = BeautifulSoup(page.read())
  7.  
  8. url = soup.find('ul', {'class': 'style33'})
  9. children = ul.findChildren()
  10. for child in children:
  11. print child.text
  12.  
  13. Birds have feathers, wings, lay eggs and are warm blooded.
  14. Birds have feathers, wings, lay eggs and are warm blooded.
  15. There are around 10000 different species of birds worldwide.
  16. There are around 10000 different species of birds worldwide.
  17. The Ostrich is the largest bird in the world. It also lays the largest eggs and has the fastest maximum running speed (97 kph).
  18. The Ostrich is the largest bird in the world. It also lays the largest eggs and has the fastest maximum running speed (97 kph).
  19. Scientists believe that birds evolved from theropod dinosaurs.
  20. Scientists believe that birds evolved from theropod dinosaurs.
  21. Birds have hollow bones which help them fly.
  22. Birds have hollow bones which help them fly.
  23. Some bird species are intelligent enough to create and use tools.
  24. Some bird species are intelligent enough to create and use tools.
  25. The chicken is the most common species of bird found in the world.
  26. The chicken is the most common species of bird found in the world.
  27. Kiwis are endangered, flightless birds that live in New Zealand. They lay the largest eggs relative to their body size of any bird in the world.
  28. Kiwis are endangered, flightless birds that live in New Zealand. They lay the largest eggs relative to their body size of any bird in the world.
  29. Hummingbirds can fly backwards.
  30. Hummingbirds can fly backwards.
  31. The Bee Hummingbird is the smallest living bird in the world, with a length of just 5 cm (2 in).
  32. The Bee Hummingbird is the smallest living bird in the world, with a length of just 5 cm (2 in).
  33. Around 20% of bird species migrate long distances every year.
  34. Around 20% of bird species migrate long distances every year.
  35. Homing pigeons are bred to find their way home from long distances away and have been used for thousands of years to carry messages.
  36. Homing pigeons are bred to find their way home from long distances away and have been used for thousands of years to carry messages.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement