Kanga and Phlipilgrim's ideas, taken together, are the optimum solution in my experienced opinion. This works ideally in an albergue. I use a variation of this myself.
As I stay in hostals whenever possible and usually have a room to myself, or sharing with another interested pilgrim, my preferred method is to use TWO very large (but featherweight) plastic "S" hooks, hooked over whatever passes for a curtain rod in the room. I buy the "S" hooks in a bath supply shop or China store.
To the bottom curve I attach one or two, long "can" band, rubber band or two. The bands can be used without the "S" hooks if necessary. These long (30 - 40 cm, 18 - 20 " +/-) rubber bands are sold in many grocery or DIY stores to attach plastic bin liners to trash cans.
I buy bands that are wider, about 1 cm (.25 in). The choice to use one or two bands to a side depends on the expected weight of the laundry I intend to hang over this rig. I usually use two to each side, just-in-case. Besides, the bands have a myriad of uses and are long enough and tough enough to use as a tourniquet in an extreme medical emergency, or simply to attach stuff to the outside of a rucksack.
From these long rubber bands, I hang one of my hiking poles extended to the longest length possible, about 130 cm long (51 in.). The result is a horizontal hanging rig for drying clothes. It works even on the end of a bunk bed with tubular railings. In essence, it replaces having a shower / tub curtain rod to throw your clothes over.
Finally, I carry FOUR lightweight, plastic travel hangers. The hooks swing down to double over the horizontal part. I found them deep in one of my storage closets. They were purchased to use with regular luggage years ago and forgotten. Each hanger weighs 42 gms. (1.5 oz). All in, they weigh as much as a bar of soap.
They fit, two to a side in my rucksack, where they serve as vertical stays. I use smaller rubber bands to hold them together in pairs.
The hangers enable me to maximize the efficiency of whatever drying rig I use, no matter where I am staying. They hold shirts or jackets easily. I use some of the few short wooden clothespins (10) I carry to fasten socks, underwear, towels or pants (tops and/or bottoms) to the hangers. The hangers hang perpendicular to the hiking staff "clothes rod" I described above and expedite drying.
I hope this technique helps...