  We prove that in a large class of Banach spaces of analytic functions in the
unit disc $\mathbb{D}$ an (unbounded) operator $Af=G\cdot f'+g\cdot f$ with
$G,\, g$ analytic in $\mathbb{D}$ generates a $C_0$-semigroup of weighted
composition operators if and only if it generates a $C_0$-semigroup. Particular
instances of such spaces are the classical Hardy spaces. Our result generalizes
previous results in this context and it is related to cocycles of flows of
analytic functions on Banach spaces. Likewise, for a large class of
non-separable Banach spaces $X $ of analytic functions in $\mathbb{D}$
contained in the Bloch space, we prove that no non-trivial holomorphic flow
induces a $C_0$-semigroup of weighted composition operators on $X$. This
generalizes previous results regarding $C_0$-semigroup of (unweighted)
composition operators.
