A covalent organic framework based dispersive solid phase extraction was developed for extraction of several antibiotics from raw cow's milk samples. For this purpose, first, the milk proteins were precipitated by zinc sulfate and after centrifugation, the analytes were extracted by the sorbent. Then, the analytes were desorbed by a proper eluent and were more concentrated by a microextraction procedure. The extractant was used for the analysis of the analytes by high-performance liquid chromatography-diode array detector. Based on the results, acceptable extraction recoveries (62–71 %) and sensitive limits of detection and quantification in the ranges of 0.11–0.19 and 0.37–0.63 ng mL−1, respectively, were obtained. The method can analyze the analytes in broad concentration range. The introduced approach was used in the analysis of fifteen raw cow's milk samples. The obtained data showed that all samples were free of the analytes. According to these results, the method can be considered an efficient procedure for extracting the analytes from raw milk samples.