Given that I'm commenting several years since you posted this question, the layouts of these sites have changed; however, even now for Q2 2023, I can see there is a discrepancy. I have encountered this issue not infrequently on different platforms (e.g., S&P CapitalIQ, Refinitiv, Bloomberg), and I assume the issue is the same here on Yahoo/Google Finance: programmers are not necessarily finance practitioners. Finance is as much an art as it is a science (it's how one uses numbers to tell a story about a company/investment), whereas the programmers assume it is a science with hard-and-fast, well-defined rules.
That said, for Q3 2023, Google is using "Net earnings (loss) attributable to the Company" (i.e., net income before preferred dividends after non-controlling interest) for its stated quarterly net income figure ($35mm), but Google is then using different figures entirely for EPS (dividing $35mm by Google EPS of $0.68 EPS does not equal Google shares out. of 1.09bn); it's not fully clear how Google gets this number. In contrast, Yahoo is a bit more consistent, using trailing-twelve months figures for net income (specifically "Net earnings (loss) attributable to the Company") to calculate its TTM EPS of $9.23, but at least it's consistent on the shares outstanding calculation. In light of this, it's really worth going back to look at the original SEC filings and doing the calculation yourself. To get the shares outstanding for the EPS calc, you'll have to hunt through the 10-Q/10-K filing to find the average shares out. for the period, but personally I prefer to use the point-in-time shares outstanding figure that is reported on the cover page of the filing. To get diluted shares, you'd have to read through the stock-based comp notes to figure out how many options are in the money as of the filing date.