Add1E commited on
Commit
8b84f77
·
verified ·
1 Parent(s): 84a336e

Update trend_crawl.py

Browse files
Files changed (1) hide show
  1. trend_crawl.py +1 -5
trend_crawl.py CHANGED
@@ -36,7 +36,6 @@ def process_trends_for_country(country_code, trends_list, tr):
36
 
37
  timestamp = convert_to_datetime(trend.started_timestamp[0])
38
  current_time = datetime.now(timezone.utc)
39
- print(current_time - timestamp)
40
  if current_time - timestamp > timedelta(days=2):
41
  continue
42
 
@@ -84,10 +83,7 @@ def get_trends(countries: list):
84
 
85
  process_trends_for_country(country, trends, tr)
86
  all_categories = trends_json[country]["All categories"]
87
- # sorted_all_categories = dict(
88
- # sorted(all_categories.items(), key=lambda x: x[1]["searchQueries"], reverse=True)
89
- # )
90
- #trends_json[country]["All categories"] = sorted_all_categories
91
  return trends_json
92
 
93
 
 
36
 
37
  timestamp = convert_to_datetime(trend.started_timestamp[0])
38
  current_time = datetime.now(timezone.utc)
 
39
  if current_time - timestamp > timedelta(days=2):
40
  continue
41
 
 
83
 
84
  process_trends_for_country(country, trends, tr)
85
  all_categories = trends_json[country]["All categories"]
86
+ print(all_categories)
 
 
 
87
  return trends_json
88
 
89