Several parameters:
Tagged selection node()(text nodes and element nodes)
In [1]: sel.xpath(""".//node()[preceding-sibling::*="Qualifications/Duties"]
[following-sibling::*="Entity Information"]""").extract()
Out[1]:
[u'<br>',
u'Texas Health Presbyterian Allen is currently in search of a Registered Nurse to help meet the growing needs of our Day Surgery Department to work PRN in Day Surgery and also float to PACU.',
u'<br>',
u'<br>',
u'<b>Basic Qualifications:</b>',
u'<br>',
u'<br>',
u'*Graduate of an accredited school of nursing',
u'<br>',
u'*Valid RN license in the state of Texas',
u'<br>',
u'*BLS',
u'<br>',
u'*ACLS',
u'<br>',
u'*PALS within 6 months of hire',
u'<br>',
u'*Minimum of 1 - 3 years experience as RN in Day Surgery, PACU, Outpatient Surgery, or ICU',
u'<br>',
u'*Strong organizational skills and ability to function in a fast paced work environment',
u'<br>',
u'*Ability to accept responsibility and show initiative to work without direct supervision',
u'<br>',
u'*A high degree of confidentiality, positive interpersonal skills and ability to function in a fast-paced environment',
u'<br>',
u'<br>',
u'<b>Preferred Qualifications:</b>',
u'<br>',
u'<br>',
u'*Three years RN experience in Outpatient Surgery along with some ICU experience.',
u'<br>',
u'*PALS',
u'<br>',
u'*PACU , Endoscopy or Ambulatory setting',
u'<br>',
u'*IV Conscious Sedation',
u'<br>',
u'<br>',
u'<b>Hours/Schedule:</b>',
u'<br>',
u'<br>',
u'*Variable',
u'<br>',
u'<br>',
u'J2WPeriop',
u'<br>',
u'<br>']
Select only text nodes: (you "free" bold lines)
In [2]: sel.xpath(""".//text()[preceding-sibling::*="Qualifications/Duties"]
[following-sibling::*="Entity Information"]""").extract()
Out[2]:
[u'Texas Health Presbyterian Allen is currently in search of a Registered Nurse to help meet the growing needs of our Day Surgery Department to work PRN in Day Surgery and also float to PACU.',
u'*Graduate of an accredited school of nursing',
u'*Valid RN license in the state of Texas',
u'*BLS',
u'*ACLS',
u'*PALS within 6 months of hire',
u'*Minimum of 1 - 3 years experience as RN in Day Surgery, PACU, Outpatient Surgery, or ICU',
u'*Strong organizational skills and ability to function in a fast paced work environment',
u'*Ability to accept responsibility and show initiative to work without direct supervision',
u'*A high degree of confidentiality, positive interpersonal skills and ability to function in a fast-paced environment',
u'*Three years RN experience in Outpatient Surgery along with some ICU experience.',
u'*PALS',
u'*PACU , Endoscopy or Ambulatory setting',
u'*IV Conscious Sedation',
u'*Variable',
u'J2WPeriop']
Select text nodes from the following sections that you want: + text nodes from bold lines:
In [3]: sel.xpath(""".//*[preceding-sibling::*="Qualifications/Duties"]
[following-sibling::*="Entity Information"]/text()
|
.//text()[preceding-sibling::*="Qualifications/Duties"]
[following-sibling::*="Entity Information"]""").extract()
Out[3]:
[u'Texas Health Presbyterian Allen is currently in search of a Registered Nurse to help meet the growing needs of our Day Surgery Department to work PRN in Day Surgery and also float to PACU.',
u'Basic Qualifications:',
u'*Graduate of an accredited school of nursing',
u'*Valid RN license in the state of Texas',
u'*BLS',
u'*ACLS',
u'*PALS within 6 months of hire',
u'*Minimum of 1 - 3 years experience as RN in Day Surgery, PACU, Outpatient Surgery, or ICU',
u'*Strong organizational skills and ability to function in a fast paced work environment',
u'*Ability to accept responsibility and show initiative to work without direct supervision',
u'*A high degree of confidentiality, positive interpersonal skills and ability to function in a fast-paced environment',
u'Preferred Qualifications:',
u'*Three years RN experience in Outpatient Surgery along with some ICU experience.',
u'*PALS',
u'*PACU , Endoscopy or Ambulatory setting',
u'*IV Conscious Sedation',
u'Hours/Schedule:',
u'*Variable',
u'J2WPeriop']