From 5644d4e5227a10b1be2bf3c33341c3eeefda8074 Mon Sep 17 00:00:00 2001 From: iamhardik Date: Sun, 12 Apr 2015 10:38:20 +0530 Subject: [PATCH] Added New File --- ada.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ada.py diff --git a/ada.py b/ada.py new file mode 100644 index 0000000..47cf2fd --- /dev/null +++ b/ada.py @@ -0,0 +1,15 @@ +import urllib.request +import html2text +from bs4 import BeautifulSoup + +f = urllib.request.urlopen('http://www.espncricinfo.com/indian-premier-league-2015/engine/match/829709.html') +soup = BeautifulSoup(f) + +a = soup.find_all("a" , class_="playerName") +length = len(a) +length = length - 1 +while(length): + b = a[length].get_text() + length = length - 1 + print(b) +