# Path: lib/_db.py
# def get_collection(db_name, collection_name, client='mongo'):
#     client = client_db_map.get(client)
#     db = getattr(client, db_name, None)
#     return getattr(db, collection_name, None)


import _env
import json
import re
import time
    import sys
from html2text import html2text
from extract import extract
from lib._db import get_collection
from judge_upload import exist_or_insert
from config.config import CONFIG


USERS = [
    {
        "id":           1,
        "name":         "jishushare",
        "slug":         "jishushare",
        "email":        "user@example.com",
        "image":        None,
        "cover":        None,
        "bio":          None,
        "website":      None,
        "location":     None,
        "accessibility": None,
        "status":       "active",
        "language":     "zh_CN",
        "meta_title":   None,
        "meta_description": None,
        "last_login":   None,
        "created_at":   1283780649000,
        "created_by":   1,
        "updated_at":   1286958624000,
        "updated_by":   1
    }
]


# title section_id from xianguo json
TECH_ID = """钛媒体 1410319
创业邦 1057591

# Path: lib/_db.py
# def get_collection(db_name, collection_name, client='mongo'):
#     client = client_db_map.get(client)
#     db = getattr(client, db_name, None)
#     return getattr(db, collection_name, None)


# Path: crawler/xianguo/news_to_ghost.py
import _env
import json
import re
import time
    import sys
from html2text import html2text
from extract import extract
from lib._db import get_collection
from judge_upload import exist_or_insert
from config.config import CONFIG



USERS = [
    {
        "id":           1,
        "name":         "jishushare",
        "slug":         "jishushare",
        "email":        "user@example.com",
        "image":        None,
        "cover":        None,
        "bio":          None,
        "website":      None,
        "location":     None,
        "accessibility": None,
        "status":       "active",
        "language":     "zh_CN",
        "meta_title":   None,
        "meta_description": None,
        "last_login":   None,
        "created_at":   1283780649000,
        "created_by":   1,
        "updated_at":   1286958624000,
        "updated_by":   1
    }
]


# title section_id from xianguo json
TECH_ID = """钛媒体 1410319
创业邦 1057591

36氪 1057676