The invention discloses a method for manufacturing a solar cell comprising an electron transport layer and a hole transport layer. The method comprises the steps of sequentially preparing a substrate, an anode, the hole transport layer, an active layer and a cathode, wherein the hole transport layer is PEDOT:PSS; and preparing the electron transport layer between the active layer and the cathode, wherein the electron transport layer is a polymer in the structure represented by general formula (I), the degree of polymerization of the polymer can be any integer within 1-300, and the manufacturing method of the polymer comprises the steps of firstly, obtaining a compound 2 through decarboxylation nitration of a compound 1, reducing into a compound 3, then diazotizing, and reacting with potassium ethyl xanthate to produce a compound 4; secondly, diazotizing aromatic amine 5, and reacting with sodium iodide to synthesize an aromatic iodo-product 6; and thirdly, reducing the compound 4 into thiophenol 7, and dissolving with aromatic chloride 8 or the aromatic iodo-product 6 under the effect of a basic catalyst to obtain the compound represented by general formula (I). The solar cell with the material serving as the electron transport layer is high in open-circuit voltage and good in device performance.