From 645d2ba979a8c18b0bf12caceada5d27178a2134 Mon Sep 17 00:00:00 2001 From: Dominic Garms Date: Mon, 27 Jan 2025 10:36:11 +0800 Subject: [PATCH] better import of cheerio --- src/scripts/googleFormsToJson.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/googleFormsToJson.ts b/src/scripts/googleFormsToJson.ts index babed1e..d8ac182 100644 --- a/src/scripts/googleFormsToJson.ts +++ b/src/scripts/googleFormsToJson.ts @@ -1,4 +1,4 @@ -import cheerio from 'cheerio' +import {load} from 'cheerio' import fetch from 'isomorphic-unfetch' import { @@ -46,7 +46,7 @@ const getFormHtml = async (formUrl: string) => { } const extractFormData = (html: string): FormData => { - const $ = cheerio.load(html) + const $ = load(html) const fbzx = $('[name="fbzx"]').attr('value') if (!fbzx) {