Based on a prototype sensitizer W2, we designed triarylamine-based p-type sensitizers W2-1 to W2-7 that contain modified pi-spacers (pi'), a pi-spacer and two anchors. For W2-1 to W2-4, instead of 2,1,3-benzothiadiazole in W2, thieno[3,4-b]-1,4-dioxin, thiophene, thieno[3,4-c][1,2,5]thiadizole, thiazolo[5,4-d]thiazole are pi' and thiophene as pi-spacer. For W2-5 to W2-8, pi' and pi are same, with 2,1,3-benzothiadiazole, thieno[3,4-b]-1,4-dioxin, thieno[3,4-c][1,2,5]thiadiazo, thiazolo[5,4-d]thiazole, respectively, as the pi'-spacers. Structure optimization, electronic level and absorption characters were calculated with density functional theory (DFT) and time-dependent DFT (TDDFT) at the CAM-B3LYP/6-311G (d, p). The solvent effect was involved using a polarized continuum model in chloroform. The results showed that the highest occupied molecular orbital and the lowest unoccupied molecular orbital guarantee sufficient hole injection (lower than -0.2 eV), and dye regeneration (lower than -0.2 eV). W2-4 has higher light-harvesting efficiency (LHE) (0.994) and larger overlap with the visible light from 400 nm to 600 nm. Finally, the results suggest that the driving force of hole injection, dye regeneration and charge recombination (Delta G(inj), Delta G(reg) and Delta G(CR)) of W2-4 are the best, with more negative Delta G(inj) (-4.33), Delta G(reg) (-1.74) and more positive Delta G(CR) (1.92). Replacing 2,1,3-benzothiadiazole with thiazolo[5,4-d]thiazole as pi'-spacers is a effective way to improve the performance of the dyes. An introduction of thiazolo[5,4-d]thiazole group can improve the absorption ability and hinder charge recombination.