Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scrapi/harvesters/push_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ def get_records(self, start_date, end_date):
yield record

def normalize(self, raw):
return NormalizedDocument(json.loads(raw['doc'])['jsonData'])
document = json.loads(raw['doc'])['jsonData']
# This is a workaround for the push API did not have proper email validation
for contributor in document['contributors']:
if contributor['email'] == '':
del contributor['email']
return NormalizedDocument(document)

@property
def run_at(self):
Expand Down