|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
如题,希望将strong标签内的文字Background和P标内的文字several合并从成:Background:several的形式
附上代码:
for soul_select_item in soul_select2: #获得abstract,soul_select2:为beautifulsoup选择后的列表
if len(soul_select_item) == 1:
print('该文章的摘要为:{}'.format(str(soul_select_item.get_text()).strip()))
elif len(soul_select_item) == 0:
print('该文章无摘要')
else:
print('该文章综合摘要的:')
for soul_select_item_1 in soul_select_item:
print('{}'.format(str(soul_select_item_1.string).strip()))
附上结果:
该文章链接为:https://pubmed.ncbi.nlm.nih.gov/32649742/
该文章的DOI为:10.1093/ajcn/nqaa152
该文章综合摘要的:
Background:
Several countries have notably reduced childhood stunting relative to economic growth over the past 15-20 y. The Exemplars in Stunting Reduction project, or "Exemplars," studies success factors among these countries with a lens toward replicability.
该文章综合摘要的:
Objectives:
This paper details the standardized mixed-methods framework for studying determinants of childhood stunting reduction applied in Exemplars studies.
附上网页源代码:
<p>
<strong class="sub-title">
Background:
</strong>
Several countries have notably reduced childhood stunting relative to economic growth over the past 15-20 y. The Exemplars in Stunting Reduction project, or "Exemplars," studies success factors among these countries with a lens toward replicability.
</p>
这样可否?
import re
import requests
url = 'https://pubmed.ncbi.nlm.nih.gov/32649742/'
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'
}
request = requests.get(url,headers=headers)
html = request.text
titles = re.findall(r'<strong .+\s* (.+:)',html)
contents = re.findall(r'</strong>\s*(.+\.)',html)
for x,y in zip(titles,contents):
print(x+y)
运行结果:Background:Several countries have notably reduced childhood stunting relative to economic growth over the past 15-20 y. The Exemplars in Stunting Reduction project, or "Exemplars," studies success factors among these countries with a lens toward replicability.
Objectives:This paper details the standardized mixed-methods framework for studying determinants of childhood stunting reduction applied in Exemplars studies.
Methods:An expert technical advisory group (TAG), criteria for identifying Exemplar countries, evidence-based frameworks, mixed methodologies (quantitative, qualitative, policy, literature review), effective research partnerships, case study process and timeline, and data triangulation and corroboration are presented.
Results:Experts in health, nutrition, and evaluation methods were selected at the study outset to provide technical support to all phases of research (TAG). Exemplar countries were selected by the TAG, who considered quantitative data (e.g., annual rates of stunting change compared with economic growth, country population size) and qualitative insights (e.g., logistics of country work, political stability). Experienced country research partners were selected and an inception meeting with stakeholder consultations was held to launch research and garner support. Evidence-based conceptual frameworks underpinned all Exemplars research activities. A systematic review of published peer-reviewed and grey literature was undertaken, along with in-depth policy and program analysis of nutrition-specific and -sensitive investments. Both descriptive and advanced quantitative analysis was undertaken (e.g., equity analyses, difference-in-difference regression, Oaxaca-Blinder decomposition). Qualitative data collection using in-depth interviews and focus groups was conducted with national and community stakeholders (i.e., child care workers and mothers) to understand country experiences. The case study process was iterative, and all research outputs were triangulated to develop the stunting reduction narrative for each country. Findings were shared with country experts for weigh-in and corroboration through dissemination events.
Conclusions:Exemplars research uses a mixed-methods framework for studying positive outliers that can be applied across diverse health and development outcomes.
Keywords:children; determinants; drivers; exemplar; framework; linear growth; mixed methods; stunting.
|
|