Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

farm-invest-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

farm-invest-cli - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

farm-invest.sh

2

package.json
{
"name": "farm-invest-cli",
"version": "1.0.4",
"version": "1.0.5",
"description": "Are there new investment opportunities on FarmCrowdy, ThriveAgric or EFarms?",

@@ -5,0 +5,0 @@ "main": "src/farm-invest-cli.js",

@@ -8,3 +8,3 @@ const { default : axios } = require('axios')

module.exports = function () {
return axios.get('https://www.efarms.com.ng/index.php').then(res => {
return axios.get('https://www.efarms.com.ng/index.php/en/farms').then(res => {
const $ = cheerio.load(res.data)

@@ -14,12 +14,12 @@

const activeProducts = $('#services div.media.services-wrap')
const activeProducts = $('section.causes div.grid')
const productList = activeProducts.map(function () {
const title = $(this).find('h3.media-heading').text().trim()
const [ address, price, returns ] = $(this).find('h4.media-heading').map(function () {
return $(this).text().trim()
}).toArray()
const link = $(this).parentsUntil('a').parent().attr('href').trim()
return { title, price, link, returns, address }
}).toArray()
const title = $(this).find('h3 a').text().trim()
const price = $(this).find('div.raised').text().trim();
const returns = $(this).find('div.goal').text().trim();
const daysLeft = $(this).find('span.remaining-days').text().trim();
const link = $(this).find('h3 a').attr('href').trim()
return { title, price, link, returns, daysLeft, farm: 'efarms' }
}).toArray().filter(({ daysLeft }) => daysLeft && !daysLeft.endsWith('ago'))

@@ -26,0 +26,0 @@ return productList

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