IB 417 then IB 5388 at Barcelona
Madrid → Barcelona → Bari
Timetable, Barcelona time
17:10IB 417 from Madrid at the gatealso LA 1683, LL 3017, OB 5004, VY 5058, AV 6076, QR 6894, BA 7135, AA 8824
11:40IB 5388 to Bari leaves the gatealso LL 5388, VY 6112
18 h 30 apart on the timetable, overnight
IB 5388 leaves 18 h 30 after IB 417 arrives on the timetable: more than half a day, so not a connection we count.