Hi Jack,
I just went to Anfield last month and used StubHub. They give $$ back if you don't get tickets (Secondary market tickets seem to be ignored mostly but strictly speaking are not allowed as I understand it.)
We had no problems, but paid a small fortune. Well worth it. Had to meet a guy at a Hotel, leave our Driver license, pick up after the game and return the tickets.
We went to a Celtic game in Glasgow as well, just got tickets off the club website. Probably able to do something similar for the Edinburgh clubs.
Take a walk up to Arthur's seat while you are there though, see the Royal Yacht Britannia, Edinburgh Castle and spend time checking out Old Town. If Harry Potter fans, gotta do a walking tour while you are there!