Been having a lot of trouble with this… new to Python so sorry if I just don’t know the proper search terms to find the info myself. I’m not even positive it’s because of the JS but that’s the best idea I’ve got.
Here’s the section of HTML I’m parsing:
...
<div class="promotion">
<div class="address">
<a href="javascript:PropDetail2('57795471:MRMLS')" title="View property detail for 5203 Alhama Drive">5203 Alhama Drive</a>
</div>
</div>
...
…and the Python I’m using to do it (this version is the closest I’ve gotten to success):
homeFinderSoup = BeautifulSoup(open("homeFinderHTML.html"), "html5lib")
addressClass = homeFinderSoup.find_all('div', 'address')
for row in addressClass:
print row.get('href')
…which returns
None
None
None
1 Answer