- post
http://cishan.chinanpo.gov.cn/biz/ma/csmh/a/csmhaDoSort.html?aaee0102_03=&field=aaex0131&sort=desc&flag=0
def charity_organization():
"""
慈善中国-慈善组织查询
http://cishan.chinanpo.gov.cn/biz/ma/csmh/a/csmhaindex.html
:return: 慈善中国-慈善组织查询
:rtype: pandas.DataFrame
"""
page_num = _get_page_num_charity_organization()
url = "http://cishan.chinanpo.gov.cn/biz/ma/csmh/a/csmhaDoSort.html"
params = {
"field": "aaex0131",
"sort": "desc",
"flag": "0",
}
outer_df = pd.DataFrame()
for page in tqdm(range(1, page_num+1)):
# for page in tqdm(range(1, 100)):
# page = 1
params["pageNo"] = str(page)
r = requests.post(url, params=params)
inner_df = pd.read_html(r.text)[0]
outer_df = outer_df.append(inner_df, ignore_index=True)
return outer_df