New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

app-ads-txt

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-ads-txt

app-ads.txt crawler according to "IAB Technology Laboratory"

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

app-ads.txt

app-ads.txt crawler according to "IAB Technology Laboratory"

NPM version NPM Downloads Node.js Version

install

  npm i app-ads-txt

How to use

    const AppAdsTxtCrawler = require('app-ads-txt').Crawler;
    const appAdsTxtCrawler = new AppAdsTxtCrawler(options);
    const appAdsTxtData = appAdsTxtCrawler.crawlData('example.com');

Example of usage

input: example.com/app-ads.txt output:

{
    "appAdsUrl": "https://example.com/app-ads.txt",
    "data"     : {
        "variables": {},
        "fields"   :
            [{
                "domain"                : "example.com",
                "publisherAccountID"    : "104023",
                "accountType"           : "DIRECT",
                "certificateAuthorityID": "79929e88b2ba73bc"
            }]
    }
}

options:

{
  "proxyUrl": "http://user:pass@example.com"
}

Exceptions

  • ERR_INVALID_URL: on invalid input url

How it works (by "IAB Technology Laboratory")

Follow these steps to transform the developer URL into a path to crawl for locating an appads. txt file.

  • Extract the host name portion of the URL.
  • Remove any “www.” or “m.” prefix present in the host name.
  • Remove all but the first (and, if present, second) name from the host name which precedes the standard public suffix. For example: a. example.com simply remains example.com b. subdomain.example.com remains subdomain.example.com c. another.subdomain.example.com becomes subdomain.example.com d. another.subdomain.example.co.uk becomes subdomain.example.co.uk
  • Append /app-ads.txt to that path.
  • Crawlers should attempt to fetch the HTTPS version of the URL first, falling back to the HTTP version if SSL is unavailable.

License

MIT

FAQs

Package last updated on 21 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts