Sri Lankan shares ended weaker on Thursday, down from a nearly seven-month closing high in the previous session, as investors booked profits even as some foreign investors sold shares ahead of the key August 17 parliamentary election, brokers said. The index has risen nearly 8 percent since July 8 through Wednesday on hopes of improved corporate earnings and political stability, brokers said. The main stock index ended 0.39 percent or 29.15 points weaker at 7,442.75, slipping from its highest close since January 16 hit on Wednesday.