Skip to content

Commit

Permalink
[update] update image url match.
Browse files Browse the repository at this point in the history
  • Loading branch information
ying_123 committed Apr 10, 2023
1 parent f9b7fff commit 080e391
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tool/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Future<List<String>> getImages(String url) async {
Iterable<RegExpMatch> matches = RegExp(
r'(https?://)?[a-zA-Z\d\u4e00-\u9fa5-._/@%]+?\.((jpe?|pn)g|webp)',
caseSensitive: false)
.allMatches(response.body);
.allMatches(response.body.replaceAll(RegExp(r'\\/'), '/'));
List<String> images = matches.map((m) => m.group(0)!).toSet().toList();
Uri uri = Uri.parse(url);
for (int i = 0; i < images.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.3.0+3
version: 1.4.0+4

environment:
sdk: '>=3.0.0-122.0.dev <4.0.0'
Expand Down

0 comments on commit 080e391

Please sign in to comment.