The invention relates to an online sampling method for an oil pipeline. The online sampling method comprises following steps: 1), a section of bypass pipeline is arranged on a main pipeline, and a liquid enters the bypass pipeline through a sampling probe; 2),
pressure detection is performed; 3), filtering and
pollution discharge are performed; 4),
pressure difference detection is performed at two ends of a filter; 5), the liquid is pressurized by a sampling pump; 6),
pressure detection is performed; 7), an outlet of the sampling pump is connected with a sampling loop and a jet loop, the liquid at an outlet end of the jet loop is sprayed into the main pipeline through a
spray nozzle, and the liquid entering the sampling loop is subjected to follow-up processes continuously; 8),
pollution is discharged; 9), online density detection is performed; 10), gas is exhausted; 11), a sample is taken and stored; 12), the residual liquid after the sample is taken is subjected to
pressure detection, temperature detection and flow detection sequentially and is finally converged into the main pipeline. According to the online sampling method for the oil pipeline, reliable, real-time and
continuous operation, accurate sample quantity and accurate loop flow control can be realized, and the requirements that the obtained sample is representative, the sampling process is automatic and the
system control is accurate are met finally.