How do i parse the date start and date end value using beautifulsoup?
<h2 name="PRM-013113-21017-0FSNS" class="pointer">
<a name="PRM-013113-21017-0FSNS">Chinese New Year Sale<br>
<span>February 8, 2013 - February 10, 2013</span>
</a>
</h2>
Something like this.
(PS: you can also use BeautifulSoup’s
text=Truemethod withfindAllto get the text instead of using regex as follows.)Update::
To have a start and end date as separate variables you can simply split them you can simply split the date variable as follows:
now
date_startvariable contains the starting date anddate_endvariable contains the ending date.