Muhammad Abdur Rahman Saad commited on
Commit
d68da38
·
2 Parent(s): 122b0c4 948bb9c

Merge branch 'main' of https://github.com/oxbridge-econ/data-collection-china

Browse files
Files changed (1) hide show
  1. controllers/vectorizer.py +1 -1
controllers/vectorizer.py CHANGED
@@ -76,7 +76,7 @@ def upsert(article, db_collection):
76
  if article is None or 'content' not in article:
77
  return None
78
  article = {k: v for k, v in article.items() if v is not None}
79
- article["articleid"] = article["id"]
80
  logging.info(article["id"])
81
  del article["id"]
82
  if len(article['subtitle'].encode('utf-8')) > 8000:
 
76
  if article is None or 'content' not in article:
77
  return None
78
  article = {k: v for k, v in article.items() if v is not None}
79
+ article["articleid"] = str(article["id"])
80
  logging.info(article["id"])
81
  del article["id"]
82
  if len(article['subtitle'].encode('utf-8')) > 8000: