Abstract Pyrazoline and pyrazole compounds are important building blocks in the development of photofunctional compounds. Two new solution-processable platinum-containing polyynes functionalized with these chromophores in the main chain ( P1 and P2 ) were synthesized and characterized by spectroscopic, thermal and optical methods. By changing the spacer from 2-pyrazoline to the electron-rich pyrazole in the main chain, the photophysical properties including energy levels, absorption wavelength and bandgap of the polymers were finely tuned. The photovoltaic properties of P1 with better absorption features were also studied. Graphical abstract