text stringlengths 1 93.6k |
|---|
time_index = date.find(':') - 3
|
res = date[:time_index]
|
return res
|
def scrape_emp_title(review):
|
if 'Anonymous Employee' not in review.text:
|
try:
|
res = author.find_element_by_class_name(
|
'authorJobTitle').text.split('-')[1]
|
except Exception:
|
logger.warning('Failed to scrape employee_title')
|
res = "N/A"
|
else:
|
res = "Anonymous"
|
return res
|
def scrape_location(review):
|
if 'in' in review.text:
|
try:
|
res = author.find_element_by_class_name(
|
'authorLocation').text
|
except Exception:
|
logger.warning('Failed to scrape employee_location')
|
res = np.nan
|
else:
|
res = "N/A"
|
return res
|
def scrape_status(review):
|
try:
|
res = author.text.split('-')[0]
|
except Exception:
|
logger.warning('Failed to scrape employee_status')
|
res = "N/A"
|
return res
|
def scrape_rev_title(review):
|
return review.find_element_by_class_name('summary').text.strip('"')
|
def scrape_helpful(review):
|
try:
|
helpful = review.find_element_by_class_name('helpfulCount')
|
res = helpful.text[helpful.text.find('(') + 1: -1]
|
except Exception:
|
res = 0
|
return res
|
def expand_show_more(section):
|
try:
|
more_link = section.find_element_by_class_name('v2__EIReviewDetailsV2__continueReading')
|
more_link.click()
|
except Exception:
|
pass
|
def scrape_pros(review):
|
try:
|
pros = review.find_element_by_class_name('gdReview')
|
expand_show_more(pros)
|
pro_index = pros.text.find('Pros')
|
con_index = pros.text.find('Cons')
|
res = pros.text[pro_index+5 : con_index]
|
except Exception:
|
res = np.nan
|
return res
|
def scrape_cons(review):
|
try:
|
cons = review.find_element_by_class_name('gdReview')
|
expand_show_more(cons)
|
con_index = cons.text.find('Cons')
|
continue_index = cons.text.find('Continue reading')
|
res = cons.text[con_index+5 : continue_index]
|
except Exception:
|
res = np.nan
|
return res
|
def scrape_advice(review):
|
try:
|
advice = review.find_element_by_class_name('gdReview')
|
expand_show_more(advice)
|
advice_index = advice.text.find('Advice to Management')
|
if advice_index != -1:
|
helpful_index = advice.text.rfind('Helpful (')
|
res = advice.text[advice_index+21 : helpful_index]
|
else:
|
res = np.nan
|
except Exception:
|
res = np.nan
|
return res
|
def scrape_overall_rating(review):
|
try:
|
ratings = review.find_element_by_class_name('gdStars')
|
res = float(ratings.text[:3])
|
except Exception:
|
res = np.nan
|
return res
|
def _scrape_subrating(i):
|
try:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.