Permalink
Browse files

longer time delay

  • Loading branch information...
erinclark erinclark
erinclark authored and erinclark committed Jan 11, 2016
1 parent 1bc761c commit 564d6835e59b424b0f83b50a82615eb49d5f360a
Showing with 5 additions and 1 deletion.
  1. +5 −1 scraper.py
View
@@ -58,12 +58,16 @@ def split_text(tender_text, front, back):
fro = tender_text.lower().find(front)
to = tender_text.lower().find(back)
if to == -1:
to = fro + 40
text_section = tender_text[fro:to]
if ':' in text_section:
item_text = text_section[text_section.find(':')+1:]
else:
item_text = text_section
item_text = item_text.encode('utf-8').strip().strip('.')
return item_text
if __name__ == '__main__':
@@ -92,7 +96,7 @@ def split_text(tender_text, front, back):
main_site = ''
awarding_authority_ref = split_text(tender_text, 'iv.3.1)', 'iv.3.2)')
contract_value = split_text(tender_text, 'ii.2.1)', 'section iv')
eoi_or_award_date = split_text(tender_text, 'v.1)d', 'v.2)')
eoi_or_award_date = split_text(tender_text, '.v.1)', 'v.2) number')
other = ''
else:

0 comments on commit 564d683

Please sign in to comment.