Skip to content

Commit

Permalink
fixup agent detail being None
Browse files Browse the repository at this point in the history
  • Loading branch information
Kooben209 authored and Kooben209 committed Mar 25, 2020
1 parent 4f5d59d commit 85541ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scraper.py
Expand Up @@ -117,9 +117,11 @@ def saveToStore(data):
if advert.find("div", {"class" : "propertyCard-keywordTag matched"}) is not None:
advertMatch = {}
postKey = random.choice(list(postTemplates))
agent = advert.find("span", {"class" : "propertyCard-branchSummary-branchName"}).text
if any(x in agent.lower() for x in excludeAgents):
continue

if advert.find("span", {"class" : "propertyCard-branchSummary-branchName"}) is not None:
agent = advert.find("span", {"class" : "propertyCard-branchSummary-branchName"}).text
if any(x in agent.lower() for x in excludeAgents):
continue

hashTagLocation = k.replace("MORPH_URL_","").replace("_"," ").title().replace(" ","")
location = k.replace("MORPH_URL_","").replace("_"," ").title()
Expand Down

0 comments on commit 85541ab

Please sign in to comment.