Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Chahed committed Nov 2, 2015
1 parent b7f6bcc commit 7a065fe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scraper.py
Expand Up @@ -77,7 +77,6 @@ def Detail_left_fc(htmltext):
Detail_left=str(htmltext.find('div',{"class":"detail_left"}).contents)
a=Detail_left.split('<h4>')
Description=a[1].split('</h4>')
Description= Description[1].encode('ascii','ignore')
Description=BeautifulSoup(Description).text
Description=suittext(Description)
return Description
Expand Down Expand Up @@ -157,7 +156,7 @@ def scrap_awarded(url):
REFERENCE= Reference(htmltext)

Title =htmltext.find('div',{"class":"contract_hd_left"}).findNext('h1').contents
Title=str(Title).encode('ascii','ignore')
Title=str(Title)
Title=BeautifulSoup(Title).text
Title=suittext(Title)
Awarding_body= Awarding_body_fc(htmltext)
Expand All @@ -179,7 +178,7 @@ def scrap_awarded(url):

Date_awarded= htmltext.find('div',{"class":"highlight_date_body"}).text
Awarded_to= htmltext.find('div',{"class":"highlight_contact_hd"}).findNext('p').contents
Awarded_to=str(Awarded_to).encode('ascii','ignore')
Awarded_to=str(Awarded_to)
Awarded_to=BeautifulSoup(Awarded_to).text
Awarded_to=suittext(Awarded_to)

Expand All @@ -205,7 +204,7 @@ def scrap_recurring(url):
REFERENCE= Reference(htmltext)

Title =htmltext.find('div',{"class":"contract_hd_left"}).findNext('h1').contents
Title=str(Title).encode('ascii','ignore')
Title=str(Title)
Title=BeautifulSoup(Title).text
Title=suittext(Title)
Awarding_body= Awarding_body_fc(htmltext)
Expand Down

0 comments on commit 7a065fe

Please sign in to comment.