dms-scrape 0.4.2 → 0.4.4

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/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -42,7 +42,6 @@ export function processHTML(link, html) {
42
42
  scrapedContent = {
43
43
  error: handlerFunction,
44
44
  url: link,
45
- category: "other",
46
45
  };
47
46
  }
48
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dms-scrape",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "main": "index.mjs",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -26,7 +26,7 @@ export function CHINATIMES($) {
26
26
  value: (el) => $(el).text().replace(/\//g, "-"),
27
27
  },
28
28
  ],
29
- source: [{ selector: "div.source", value: (el) => $(el).text().trim() }],
29
+ source: { selector: "div.source", value: (el) => $(el).text().trim() },
30
30
  author: [{ selector: "div.author", value: (el) => $(el).text().trim() }],
31
31
  content: [
32
32
  {
package/test.mjs CHANGED
@@ -102,7 +102,7 @@ const testLink = [
102
102
  // console.log(COMPOTECHASIA(cheerio.load(compotechtest)))
103
103
  // console.log(INSIDE(cheerio.load(insidetest)))
104
104
 
105
- console.log(await dmsScrape("link", "https://www.ctee.com.tw/news/20240805700832-431207"))
105
+ console.log(await dmsScrape("html", "https://www.chinatimes.com/realtimenews/20240904005289-260410?chdtv", chinatest))
106
106
  // const link = "https://www.chinatimes.com/newspapers/20240820000224-260204?chdtv"
107
107
  // const check = "https://www.chinatimes"
108
108
  // console.log(link.startsWith(check))