Dyson Logos
Hero
By the book, they probably should have received full xp for both encounters, but then you create a loop-hole whereby the party could just keep coming back, charming the spider, go through the room, come back again, and so on. I don't like loop-holes.
I would have rewarded them with full XP both times (if the spider had full hit points the second time at least).
But I wouldn't have created a loop-hole. In the underdark campaign I played in we had to get across a guarded chasm using an ettin-controlled bridge. We had to do this pretty often later in the campaign. We got XP the first time we managed to defeat the ettins and get by, and the second time. The third time we used the same spell and bribe as the second time and got no XP - we didn't defeat the problem this time, we were still coasting by on the last time we had, just as if we had killed the boss Ettin. Same thing for the next dozen crossings. Then the boss Ettin got fed up with us and started extorting more money so we finally dealt with him in a more... final... fashion. And got XP for it.
In the opinion of our players and DM, using the same method to defeat the same critter over and over again isn't a new victory every time, it's the same thing as killing the critter once and wandering past every time (except it takes more resources in our case, as we went through there just under a score of times in that campaign).