Mobile device (100, 200, 300) for taking a sample of a pressurised gas from a pipe, which device comprises, in a single housing (105, 205, 305): - a removable fastener (110, 210, 310) of an inlet line (115, 215, 315) to a branch of the pipe, - an expander (120, 220, 320) of the gas passing through the inlet line, - at least one intermediate line (125, 225, 325) configured to transfer the gas coming from the expander, - a means (130, 230, 330) for measuring the flow rate of gas passing through at least one intermediate line, - a means (135, 235, 335) for regulating the flow rate of gas passing through at least one intermediate line, and - a removable fastener (140, 240, 360) of an outlet line (241, 342), connected to at least one intermediate line, configured to be fixed to a sampler (400, 600); and at least one intermediate line (325, 326) comprises a flexible portion (327, 328) positioned upstream from the flow rate measurement means (330, 331) and from the flow rate regulation means (335, 336), the device comprising: - a means for fixing a sampler to connect this sampler to a portion of the inflexible intermediate line connected to the expander, on one side, and the flexible portion, on the other side, characterised in that the device comprises, for positioning a variable-length sampler, a means (365, 370) for moving, along an axis of insertion of the sampler in the device, one end of the flexible portion (327, 328) configured to be fixed to the sampler at a position between two extreme positions corresponding to the desired minimum and maximum extension lengths for the flexible portion. - a removable fastener (110, 210, 310) of an inlet line (115, 215, 315) to a branch of the pipe, - an expander (120, 220, 320) of the gas passing through the inlet line, - at least one intermediate line (125, 225, 325) configured to transfer the gas coming from the expander, - a means (130, 230, 330) for measuring the flow rate of gas passing through at least one intermediate line, - a means (135, 235, 335) for regulating the flow rate of gas passing through at least one intermediate line, and - a removable fastener (140, 240, 360) of an outlet line (241, 342), connected to at least one intermediate line, configured to be fixed to a sampler (400, 600); and at least one intermediate line (325, 326) comprises a flexible portion (327, 328) positioned upstream from the flow rate measurement means (330, 331) and from the flow rate regulation means (335, 336), the device comprising: - a means for fixing a sampler to connect this sampler to a portion of the inflexible intermediate line connected to the expander, on one side, and the flexible portion, on the other side, - a means for fixing a sampler to connect this sampler to a portion of the inflexible intermediate line connected to the expander, on one side, and the flexible portion, on the other side, characterised in that the device comprises, for positioning a variable-length sampler, a means (365, 370) for moving, along an axis of insertion of the sampler in the device, one end of the flexible portion (327, 328) configured to be fixed to the sampler at a position between two extreme positions corresponding to the desired minimum and maximum extension lengths for the flexible portion.