Two men from Skegness, Lincolnshire, who took photographs of themselves stealing thousands of pounds from gambling machines, have been sentenced by a judge at Bradford Crown Court.

Benjamin Robinson, 30, was jailed for 32 months, while Daniel Hutchinson was given a six-month suspended sentence after they admitted taking the cash.

But they are not the first criminals to be hoist by their own petard - as the following cases illustrate.

'Doing. Tesco. Over.'

Image copyright Facebook Image caption Andrew Hennells posted a photo of a knife on Facebook as well as his boast about "doing Tesco over"

Armed robber Andrew Hennells was caught after he boasted on Facebook about his plans to raid a supermarket in a post which included a selfie, a picture of a knife, and the words: "Doing. Tesco. Over."

Police caught him 15 minutes later with the knife and £410 in cash stolen from a Tesco in King's Lynn, Norfolk.

He was jailed for four years last April.

Facebook boast Tesco robber jailed

'Goldilocks' burglar caught napping

Image copyright Allan Bentley Cavendish Press Image caption Burglar Lukasz Chojnowski washed his pots and his pants in the victims' home

A retired couple from Lancashire returned home from a holiday in 2014 to discover a burglar fast asleep in their bed.

Martin Holtby and Pat Dyson were amazed to find the intruder, Lukasz Chojnowski, had done their dishes, washed his underwear and even bought some groceries.

Ms Dyson said their house "wasn't too tidy" when they went away, but Chojnowski - who is originally from Poland but moved to Leeds - had kindly tidied up.

"He did burn an old saucepan but that happens!" she added. Chojnowski, then 28, admitted burglary, and was given a two-year conditional discharge and ordered to pay £200 costs.

'Goldilocks' burglar spared porridge

Bird-brained prank

Media playback is unsupported on your device Media caption The penguin-nappers tried 'their incompetent best' to care for Dirk by putting him in the shower

Two Welsh tourists landed themselves in court in 2012 after they got drunk and stole a penguin called Dirk from Sea World in Australia.

Rhys Owen Jones, 21, and Keri Mules, 20, from south Wales, broke into the park on Queensland's Gold Coast, swam with the dolphins and let off a fire extinguisher in the shark enclosure, before making off with poor Dirk.

When they woke up - hung-over and with the flightless bird in their apartment - they tried "their incompetent best" to care for him by feeding him and putting him in the shower, the court heard.

They later released Dirk into a canal, but were spotted by locals who called police. A magistrate fined them 1,000 Australian dollars (equivalent to £637 at the time) each, and told them to drink "a little less vodka".

Dirk was rescued and returned to Sea World unharmed.

Tourists fined over penguin theft

'I look like James Brown on the run'

Image copyright Police handout

A man suspected of arson and vandalism sent a selfie to police in Ohio in the US because he found the photo on his arrest warrant to be unflattering.

Image copyright Lima Police Department Image caption Mr Pugh did not like this original police photo

Donald "Chip" Pugh texted police a photo of himself and wrote: "Here is a better photo that one is terrible".

He told a local radio station: "Man, they just did me wrong. They put a picture out that made me look like I was a Thundercat... or James Brown on the run. I can't do that."

Lima Police Department responded by saying: "We thank him for being helpful, but now we would appreciate it if he would come to speak to us."

He was later arrested in Florida.

US fugitive sends selfie to police

The terrorist who claimed his own reward

Image copyright Not Specified

Officials were left baffled by an Afghan Taliban commander who gave himself up - and then tried to claim the $100 reward for his capture.

Mohammad Ashan, a "mid-to-low-level Taliban commander", was suspected of organising attacks on US and Afghan troops in the east of the country.

According to reports, he walked up to a police checkpoint in 2012, pointed to a wanted poster featuring his face, and asked for the $100 finder's fee.

The authorities were at a loss to explain his actions, although one US official reportedly told journalists: "Clearly, this man is an imbecile."

Taliban leader claims arrest cash

'Don't move, I have a cucumber'

Image copyright Getty Images

A man who tried to rob a Glasgow bookmakers while "armed" with a cucumber came unstuck when he was tackled to the ground by an off-duty police officer.

Gary Rough brandished the vegetable - covered in a black sock - at a female worker at Ladbrokes in Shettleston and demanded cash, which she refused.

Rough was then pinned down by the officer and arrested. He initially told police it was all a "joke" before enquiring: "Am I getting the jail for this?"

He was indeed jailed at the High Court in Glasgow in 2014 after admitting assault with intent to rob.

Robber armed with cucumber jailed

'Catch me if you can'

Image copyright Wales News Service Image caption Logan James is back behind bars after telling Gwent Police: 'Catch me if you can'

A criminal on the run took the ill-advised approach of taunting Gwent Police when they posted a Facebook appeal to trace him last February.

Logan James, then 19 and from Caerphilly, was wanted for breaching his prison release terms after serving a sentence for wounding, affray, common assault and being in possession of a knife.

"Haha catch me if you can wont see me slipping [sic]," James taunted, later telling a news agency: "I have been walking around near home so they're not trying too hard to catch me."

He was caught later that day. Police thanked him for "drawing attention to our efforts to return him to prison".

Police 'thank' Facebook taunt man

Hapless hold up

Media playback is unsupported on your device Media caption James Allan needed help from staff to open the door to leave

A hapless hold up of a newsagent in Abingdon, Oxfordshire, was captured on CCTV in 2012.

During his attempted heist, James Allan removed his balaclava, fell over a drinks display and then could not open the door to escape - because he was pushing it instead of pulling.

The lady he had just held up with a toy gun had to come and open it for him.

Not only that, but he had also tried to rob the same shop 10 days earlier. Allan, then 29 and of no fixed address, was sentenced to three years in prison for the offence shown in the video, and two years for possession of a firearm or imitation firearm, to run concurrently.

CCTV of bungling robber released

Bag man Badman

Media playback is unsupported on your device Media caption Christopher Badman was seen removing the disguise from his head

The aptly-named Christopher Badman, from Bridgend in south Wales, used a carrier bag on his head as a disguise when he burgled a hotel in nearby Porthcawl during its annual Elvis Presley convention.

Unfortunately for him, he was captured on CCTV taking the bag off his head, and looking towards the camera.

He had gone "to some trouble" to disguise his identity, but once of the bag was off "of course, his cover was blown", said police, who then traced him.

Badman admitted burglary and was ordered to pay £900 costs and a £100 surcharge.

Burglar's bag disguise fail

Left hanging

Media playback is unsupported on your device Media caption A burglar was caught out after his plan to break into a flat in China left him hanging around

A burglar in China had to be rescued after his attempt to squeeze through a small fifth floor window of an apartment block left him dangling.

It took rescuers 30 minutes to free him. He was eventually handed over to police.

Bungling burglar in China left hanging five storeys up

The bank robber who gave his address

Image copyright Wales News Service Image caption Smith wore sunglasses and socks over his shoes when he went back into the bank

An aspiring bank robber who wore a "terrible disguise" of sunglasses and socks over his shoes gave the cashier his full name and address - half an hour before he attempted to hold the branch up.

Dean Smith, then 27, went into his local branch of Barclays in the Welsh village of Treorchy to change his address and spotted the cash in the tills.

He returned in his disguise and demanded the money, but fled empty-handed when the cashier refused. Police had little difficulty tracking him down.

He admitted he had been "very stupid" and was jailed for two-and-a-half years for attempted robbery and carrying a bladed weapon in 2014.

Blundering bank robber is jailed

Foiled by the auto-lock

Image copyright The Star Image caption The suspected thief locked himself in the car he was allegedly attempting to steal

A suspected car thief in Pretoria, South Africa, was foiled when the auto-lock system of the car he allegedly broke into trapped him inside.

According to The Star newspaper, the man was stuck for an hour and a half shouting for help, while amused passers-by pointed and laughed.

The newspaper reports that when the owner of the car returned, she yelled, "What are you doing in my car?" before unlocking it - at which point officers from Pretoria Central police station promptly arrested him.

Auto-lock traps suspected car thief

Smart phone, stupid robber

Image copyright South Yorkshire Police Image caption Ashley Keast was jailed for two years and eight months after pleading guilty to burglary

Not the first to be caught out by a selfie, and probably not the last, Ashley Keast used a stolen SIM card to snap a self portrait inside a house he was burgling.

The Rotherham man then posted the picture on the Whatsapp messenger application - but also unknowingly sent the picture to the victim's work colleagues.

Officers found him at his home with a stolen Rolex watch, worth £4,000, hidden behind a radiator. Keast, then 25, was jailed for two years and eight months in 2014 after he admitted burglary.

Bungling burglar snared by selfie