def store_providers(self, provider_data):
if not hasattr(provider_data, '<STR_LIT>'):<EOL><INDENT>raise OEmbedException('<STR_LIT>')<EOL><DEDENT>provider_pks = []<EOL>for provider in provider_data:<EOL><INDENT>if '<STR_LIT>' not in provider or'<STR_LIT>' not in provider:<EOL><INDENT>continue<EOL><DEDENT>resource_type = provider.get('<STR_LIT:type>')<EOL>if resource_type not in RESOURCE_TYPES:<EOL><INDENT>continue<EOL><DEDENT>stored_provider, created = StoredProvider.objects.get_or_create(<EOL>wildcard_regex=provider['<STR_LIT>']<EOL>)<EOL>if created:<EOL><INDENT>stored_provider.endpoint_url = relative_to_full(    <EOL>provider['<STR_LIT>'],<EOL>provider['<STR_LIT>']<EOL>)<EOL>stored_provider.resource_type = resource_type<EOL>stored_provider.save()<EOL><DEDENT>provider_pks.append(stored_provider.pk)<EOL><DEDENT>return StoredProvider.objects.filter(pk__in=provider_pks)<EOL>
Iterate over the returned json and try to sort out any new providers