Skip to content

Commit 114ce56

Browse files
committed
Fixes #47: catch exception if pos['description'] is None
1 parent 5190782 commit 114ce56

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scrape_linkedin/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ def get_job_info(job):
138138
for pos in positions:
139139
pos['company'] = company
140140
pos['li_company_url'] = li_company_url
141-
pos['description'] = pos['description'].replace(
142-
'See less\n', '').replace('... See more', '').strip()
141+
try:
142+
pos['description'] = pos['description'].replace(
143+
'See less\n', '').replace('... See more', '').strip()
144+
except:
145+
pass
143146

144147
return positions
145148

0 commit comments

Comments
 (0)