diff --git a/lib/src/metadata_fetch_base.dart b/lib/src/metadata_fetch_base.dart index 8ebc2cc..ab15557 100644 --- a/lib/src/metadata_fetch_base.dart +++ b/lib/src/metadata_fetch_base.dart @@ -20,7 +20,7 @@ class MetadataFetch { defaultOutput.description = url; // Make our network call - final response = await http.get(Uri.parse(url)); + final response = await http.get(Uri.parse(url), headers: {'User-Agent': 'Googlebot'}); final headerContentType = response.headers['content-type']; if (headerContentType != null && headerContentType.startsWith(r'image/')) { diff --git a/pubspec.yaml b/pubspec.yaml index a9c7c2a..24ac998 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - http: ^0.13.3 + http: ^1.0.0 string_validator: ^0.3.0 html: ^0.15.0