1 week dry cough, with sometimes (once or twice a day) brown phlegm. Should I buy an expectorant or antitussive?

Cough. Do you have fever or chills? Any chest pain? You might need to get a cxr to exclude the possibility of having pneumonia since the treatment will be of antibiotics. It is possible also that you have allergic symptoms or even asthma. I would rather give a treatment of the cause of the cough than the cough itself.