China’s e-commerce and entertainment giant Alibaba beat market expectations with earnings per share of $1.83 in the second quarter of its financial year. The group also beat financial analysts’ expectations of its revenue, with a 40% year-on-year increase to RMB119 billion (US$16.7 billion).

Group profits in the three months from July to September were $9.90 billion (RMB70.7 billion) shown on the GAAP accounting standard and including gains from its stake in Ant Financial. Expressed in a non-GAAP fashion and without the one-off gains, profits in the quarter amounted to $4.58 billion (RMB32.8 billion), an increase of 40% year-over-year.

The healthy numbers were notably driven by a 64% increase in revenues for cloud computing, as China’s economy becomes increasingly digital.

The digital media and entertainment business cut its losses and enjoyed a 23% revenue gain in the quarter. Adjusted losses in the sector were RMB2.21 billion ($313 million), compared with loss of RMB3.8 billion, on revenue that increased to RMB7.30 billion ($1.03 billion), up from RMB5.94 billion.

The segment still only accounts for 6% of Alibaba’s group revenue. And the group said that “the synergies between our commerce and entertainment businesses continue to deliver a superior use experience that has helped to bring more paying subscribers onto the Youku online video platform. For the quarter, Youku’s average daily subscribers increased 47% year-over-year.” Youku is the third largest streaming video operator in China.

While Alibaba pointed to Youku “investing in original content production capability, while ensuring cost efficiencies and return on investment,” it also said that the revenue increase was mainly due to (the) consolidation of Alibaba Pictures starting in March 2019.

On a six months view, from April to September, the digital media and entertainment businesses showed losses this financial year totaling RMB4.44 billion $629 million), down from RMB6.93 billion in the same period last year. Revenue increased by 14%, up to RMB13.6 billion ($1.92 billion), from RMB11.9 billion.