New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jcscraper

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jcscraper - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

1

dist/getQuotes.d.ts
import { ClickToTweetRef } from "./getClickToTweetRefs";
export interface Quote {
rawText: string;
text: string;

@@ -5,0 +4,0 @@ clickToTweetId: string;

15

dist/getQuotes.js

@@ -5,9 +5,8 @@ "use strict";

const tslib_1 = require("tslib");
const config_1 = require("./config");
const QuoteCleaner_1 = require("./QuoteCleaner");
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
const cheerio = (0, tslib_1.__importStar)(require("cheerio"));
const promises_1 = (0, tslib_1.__importDefault)(require("fs/promises"));
const path_1 = (0, tslib_1.__importDefault)(require("path"));
const config_1 = require("./config");
const getClickToTweetRefs_1 = require("./getClickToTweetRefs");
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
const cheerio = (0, tslib_1.__importStar)(require("cheerio"));
async function getQuotes() {

@@ -55,8 +54,10 @@ const quotesFilename = "quotes.json";

const $ = cheerio.load(data);
const rawText = $("title").text();
const text = $("title").text();
if (!/\w/.test(text)) {
throw new Error(`getQuoteTest: not a quote on clickToTweetId '${clickToTweetRef.id}' with text '${text}'`);
}
return {
source: clickToTweetRef.source,
clickToTweetId: clickToTweetRef.id,
rawText: rawText,
text: new QuoteCleaner_1.QuoteCleaner(rawText).clean().text,
text,
};

@@ -63,0 +64,0 @@ }

{
"name": "jcscraper",
"version": "0.0.9",
"version": "0.0.10",
"description": "Scrape utilities for James Clear.com 3-2-1 newsletter",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc