Baidu said second-quarter net profit climbed, thanks to growth in online-marketing and video-streaming services.