Skip to content

Commit

Permalink
Merge pull request #5 from refoxdev/master
Browse files Browse the repository at this point in the history
fixed FormatException: Unexpected character (at character 1) bug
  • Loading branch information
viralvaghela authored Aug 13, 2020
2 parents d588751 + a9689f5 commit c06e22c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -141,7 +141,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -176,7 +176,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
Expand Down
5 changes: 4 additions & 1 deletion lib/flutter_insta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ class FlutterInsta {

//Download reels video
Future<String> downloadReels(String link) async {
var downloadURL = await http.get(link + "/?__a=1");
var linkEdit = link.replaceAll(" ", "").split("/");
var downloadURL = await http.get(
'${linkEdit[0]}//${linkEdit[2]}/${linkEdit[3]}/${linkEdit[4]}' +
"/?__a=1");
var data = json.decode(downloadURL.body);
var graphql = data['graphql'];
var shortcode_media = graphql['shortcode_media'];
Expand Down
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -120,7 +120,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -155,7 +155,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit c06e22c

Please sign in to comment.