How to purge a corridor of spiders?
The way I always tackle this is with an advancing wall of fence posts. Assuming you have mine shafts nearby (since that is where these spawners usually show up) go grab a whole bunch of them.
Now, you are probably in a 3-by-3 shaft, so go to the wall of wood pillars and place a 3-by-3 wall of fence posts over it. Next, go to one of the side walls and break out the middle block (the one at head height) which is immediately adjacent to a fence post you just placed. This will make a gap on the side of the fence wall that is wide enough for you to mine away or place blocks behind the fence wall, but narrow enough that cave spiders can't fit through.
Beware, the spiders can still reach you to hit you if you are too near the gap, so maintain a safe distance and time your attacks when the spiders approach the gap. Once you clear enough of them out, you can walk up to the gap and start to place another 3-by-3 fence wall ahead of where the current one is. Then you can break the first fence wall and advance.
Lather, rinse, repeat and eventually you will get close enough to the spawner to either destroy it or place torches to deactivate it. It can take some time but it will keep you from getting killed under a tidal wave of angry poisonous spiders.
Can you leave and come back? The most surefire way to purge it is to move far enough away that the spiders de-spawn, and then you simply return and quickly open it and disable the spawner.
Here is what you need to do:
Make a lot of pressure plates
place the pressure plates in front of where you will bust open the spider entrance
place a lot of TNT at the pressure plates so they can blow up
Break open the spider entrance and RUN!
Come back and place torches around the spider trap to disable it
This is optional, but you can make a spider trap
You are done and with unlimited access to string and spider eyes
I would break the wood pillars and replace them (one by one) with fenceposts, carefully of course. That way at least you could see what you were getting into. After that, you really have a few issues:
- You need to eliminate the spiderwebs that will keep you from getting to the spawner
- You need to not die from the spider onslaught
- You need to get to the spawner and destroy it
For me, the hardest part of this process is almost always the "getting rid of all the spiderwebs" part. You can't burn them (or at least, last time I tried you couldn't) using a flint, and you would waste TNT blowing them up. If you can get above the room, I would do that. Make a single block hole and put a bucket of lava into it, which will fall and spread out. That will kill at least some of the spiders. While that is running, go back to one of the sides (the one in the corridor that you blocked off with wood, presumably) and make a single hole at eye level. Between the lava and you whacking at the spiders, you will be able to make a pretty big dent. Once you get enough spiders and spiderwebs wiped out, just run in and put a torch on the spider spawner. Once that's done, you can take your time - either farming the spiders, or just killing them entirely.
Use a potion of invisibility, clean out spider webs with shears, and light up corridor. Come back armored up and kill any remaining spiders.