GithubHelp home page GithubHelp logo

abcdan / findonpage Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 27 KB

Simple Node.js Library to check if something is on a webpage

License: GNU General Public License v3.0

JavaScript 100.00%
nodejs find request findonpage easy

findonpage's Introduction

findonpage

Simple Node.js Library to check if something is on a webpage

How to setup

  1. npm install findonpage
  2. Then require the package by doing this const find = require('findonpage')

How to use

If you've required the package, as seen here above, you'll have to decide which type of find you want to use. Here's the list:

  • normal, this one simply makes a request and check if it's on the page.
  • fake, this one will use a random user agent. Some websites require a user agent and this one will use a random one.
  • anticf, this one will try to bypass Cloudflare their "under attack" pages.

After you've decided which one you want to use you can use the following snippets to use them:

Normal

// Make a simple requests, no random user agents.
find.normal(url, word, r => {
    console.log('Normal: ' + r)
})

Fake

// Fake, this one generates random user agents. Some websites require user agents and will block requests without them.
find.fake(url, word, r => {
    console.log('Fake: ' + r)
})

AntiCF

// Anticf, this one will try to bypass cloudflare their "I'm under attack" mode.
// This one can take up to 10 seconds when the page is under attack mode but will succeed in getting a result.
find.anticf(url, word, r => {
    console.log('AntiCF: ' + r)
})

This will return type: true/false in the console, you can now use the true/false to do other cool stuff!

Credits

Thanks CMDJojo for helping me making this small package

findonpage's People

Contributors

abcdan avatar kyleerhabor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.