In this study, donor–acceptor random polymers containing benzotriazole acceptor and bistriphenylamine and benzodithiophene donors, P1 and P2, were successfully synthesized by Stille coupling polymerization. The effect of bistriphenylamine moiety and thiophene π‐conjugated linker on electrochemical, spectroelectrochemical, and optical behaviors of the polymers were investigated. Optoelectronic properties and photovoltaic performance of the polymers were examined under the illumination of AM 1.5G, 100 mW cm−2. The polymers were characterized by cyclic voltammetry, UV‐Vis‐NIR absorption spectroscopy, gel permeation chromatography. HOMO/LUMO energy levels of P1 and P2 were calculated as −5.47 eV/–3.41 eV and −5.43 eV/–3.27 eV, respectively. Bulk heterojunction type solar cells were constructed using blends of the polymers (donor) and [6,6]‐phenyl C71 butyric acid methyl ester (PC71BM) (acceptor). Photovoltaic studies showed that the highest power conversion efficiency of these photovoltaic devices were recorded as 3.50% with open circuit voltage; 0.79 V, short circuit current; 9.45 mA cm−2, fill factor; 0.53 for P1:PC71BM (1:2, w/w) in 3% o‐dichlorobenzene (o‐DCB) solution and 3.15% with open circuit voltage; 0.75 V, short circuit current; 8.59 mA cm−2, fill factor; 0.49 for P2:PC71BM (1:2, w/w) in 2% chlorobenzene (CB) solution. © 2017 Wiley Periodicals, Inc. J. Polym. Sci., Part A: Polym. Chem. 2017, 55, 3705–3715