Skip to content

Commit

Permalink
Remove logging for search suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedon-dev committed Sep 13, 2024
1 parent 008380b commit 5d4b8b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/plugins/official_plugins/pornhub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,14 @@ class PornhubPlugin extends PluginBase implements PluginInterface {
Uri.parse(
"https://www.pornhub.com/video/search_autocomplete?&token=${sessionCookies["token"]}&q=$searchString"),
headers: {"Cookie": "ss=${sessionCookies["ss"]}"});
logger.i("Response body: ${response.body}");
logger.d("Response body: ${response.body}");
Map<String, dynamic> data = jsonDecode(response.body);
// The search results are just returned as key value pairs of numbers
// e.g. {"0": "suggestion1", "1": "suggestion2", "2": "suggestion3"}
// combine them into a simple list
List<String> suggestions = [];
data.forEach((key, value) {
if (key != "isDdBannedWord" && key != "popularSearches") {
logger.d("Adding $value to suggestions");
suggestions.add(value);
}
});
Expand Down

0 comments on commit 5d4b8b2

Please sign in to comment.