Given an Euler product of the form \begin{align} L(s) = \prod_{p}(1 - a_{p} p^{-s} - b_{p} p^{-2s})^{-1} \end{align} where $a_n$ and $b_n$ are not necessarily a multiplicative arithmetic functions of $n$, is there a prescription for computing the series coefficients, $L(s) = \sum_{n \geq 1} c_n \ n^{-s}$ given $a_p$ and $b_p$?
This example specializes to some familiar examples. For instance, if $b_{p} = 0$ for all primes, then $c_n = \prod_{p \mid n} a_{p}^{\text{ord}_{p}(n)}$. In particular, if $a_p = \chi(p)$, a Dirichlet character, then $L$ is the corresponding Dirichlet $L$-function with $c_n = \chi(n)$.
References are certainly welcome!