import requests
class Cfda:
    def _init_(self,url):
        self.url = 'http://125.35.6.84:81/xk/itownet/portalAction.do?method=getXkzsList'
    def getCfda(self,datas):
        self.url = 'http://125.35.6.84:81/xk/itownet/portalAction.do?method=getXkzsList'
        self.html = requests.post(self.url,data = datas)
        for i in range(15):
          self.data = self.html.json()['list'][i]['EPS_NAME']
          self.data2File(self.data)
    def data2File(self,datas):
        with open(r'C:/Users/hp/Desktop/shanda/teacher fang/try/governance/cfda1.txt','a',encoding='utf-8') as ff:
            ff.write(datas)
if __name__ == '_main_':
    cfda = Cfda()
    for n in range(1,5):
        data ={'applyname':'',
                'applysn':'',
                'conditionType':1,
                'on':'true',
                'page':n,
                'pageSize':15,
                'productName':''}
        cfda.getCfda(data)