Skip to content

Commit

Permalink
update offer get_meta_data (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Em-jey authored and PythonicNinja committed Nov 23, 2017
1 parent eaee04d commit f0bfed1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions morizon/offer.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ def get_voivodeship_for_offer(item, *args, **kwargs):


def get_meta_data(markup):
data = str(markup).split('__layer.push({"property":')[1].split(',"company":')[0]
print(data)
data = str(markup).split('__layer.push({"property":')[1]
end = re.findall(r',"company"|,"event"', data)[0]
data = data.split(end)[0]
data = json.loads(data)
return data

Expand Down

0 comments on commit f0bfed1

Please sign in to comment.