62 "offset": (params[
"pageno"] - 1) * results_per_page,
63 "orderby": sort_order,
64 "size": results_per_page,
67 if params[
"time_range"]:
68 time_diff_days = time_range_duration_map[params[
"time_range"]]
69 start_date = datetime.now() - timedelta(days=time_diff_days)
70 args[
"start_date"] = start_date.isoformat()
72 params[
"url"] = f
"{base_url}/pf/api/v3/content/fetch/articles-by-search-v2?query={quote_plus(dumps(args))}"