dms-scrape 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/test.mjs CHANGED
@@ -2,7 +2,7 @@ import { dmsScrape } from "./index.mjs";
2
2
  import * as cheerio from "cheerio"
3
3
  import { cteetest } from "./test/tested/cteetest.js";
4
4
  import { DIGITIMES } from "./sources/T1/DIGITIMES.mjs";
5
- import { digitest } from "./test/tested/digitimes2.js";
5
+ import { digitest } from "./test/tested/digitest.js";
6
6
  import { chinatest } from "./test/tested/chinatest.js";
7
7
  import { CHINATIMES } from "./sources/T2/CHINATIMES.mjs";
8
8
  import { NXTAPPLE } from "./sources/T2/NXTAPPLE.mjs";
@@ -77,6 +77,32 @@ const testLink = [
77
77
  // console.log(CNYES(cheerio.load(cnyestest)))
78
78
  // console.log(SAYDIGI(cheerio.load(saydigitest)))
79
79
  // console.log(await dmsScrape("link", "https://www.compotechasia.com/a/press/2024/0919/58658.html"))
80
- console.log(await dmsScrape("link", "https://www.inside.com.tw/article/36326-meta-announces-300-quest-3s-a-cheaper"))
80
+
81
+ //seriosu bug: https://www.xfastest.com/thread-292861-1-1.html
82
+ // bug title: https://www.eprice.com.tw/mobile/talk/6113/5812708/1
83
+ //unwanted content: https://www.sogi.com.tw/articles/realme_13_pro_plus/6263085
84
+ /// undefined: https://www.digitimes.com.tw/tech/dt/n/shwnws.asp?cnlid=1&id=0000703998_EAN8YJ9ZLL4AQU7Z9IWZT
85
+ // const urls = ["https://www.xfastest.com/thread-292892-1-1.html", "https://www.cool3c.com/article/225948" , "https://tw.nextapple.com/finance/20241002/F46EF42772FDB0898B925982A2D4F7D3" ]
86
+ // for (const url of urls) {
87
+ // await multscrape(url);
88
+ // }
89
+
90
+ /// sogi promotion: https://www.sogi.com.tw/articles/samsung_galaxy_tab_s10_ultra/6263080
91
+ // eprice title: https://www.eprice.com.tw/mobile/talk/102/5812686/1
92
+ ///bug: https://www.cool3c.com/article/226021
93
+ // multscrape("https://3c.ltn.com.tw/news/59704")
94
+
95
+ // async function multscrape(url) {
96
+ // const data = await dmsScrape("link", url);
97
+ // console.log(data.title);
98
+ // console.log(data.date + ' / ' + data.source + ' / ' + data.author);
99
+ // console.log(data.url);
100
+ // console.log(data.content);
101
+ // }
81
102
  // console.log(COMPOTECHASIA(cheerio.load(compotechtest)))
82
103
  // console.log(INSIDE(cheerio.load(insidetest)))
104
+
105
+ console.log(await dmsScrape("link", "https://www.ctee.com.tw/news/20240805700832-431207"))
106
+ // const link = "https://www.chinatimes.com/newspapers/20240820000224-260204?chdtv"
107
+ // const check = "https://www.chinatimes"
108
+ // console.log(link.startsWith(check))