DD used to throw hour long tantrums and occasionally several a day.
I tried to avoid triggers such as being too hot, tired, hungry, or thirsty.
I used to let her flail around in a corner where she couldn't hurt herself or anyone else. I felt it was important for her to learn how to calm herself down - which she did. I don't remember her throwing tantrums because she wanted something e.g. candy or toys, but if she had, I wouldn't have given in.
If your DD is attacking you then put her in a play pen or similar so she can throw soft toys around or throw herself on the ground without damaging stuff or being able to hit or bite you.
I noticed that DD's tantrums peaked at nearly 3 years of age and then started gradually getting less and less. It took a while. Other DC, including DD's twin didn't throw tantrums like she did so it was a bit worrying. Her twin would fix me with a steely gaze and headbutt the couch, once she icily intoned 'you will pay for this' which is un-nerving from a two year old.
DD is now the kindest, politest, most sensible and responsible adult, and very considerate of others. She does have a tendency to worry so I wonder if the tantrums were because she felt the emotions or worry acutely and that was her way of dealing with it?