Skip to content

Instantly share code, notes, and snippets.

@botic
Last active May 30, 2019 16:36
Show Gist options
  • Select an option

  • Save botic/3dc09169bfeb4920e852e92209c73745 to your computer and use it in GitHub Desktop.

Select an option

Save botic/3dc09169bfeb4920e852e92209c73745 to your computer and use it in GitHub Desktop.
GEN Media Literacy URL Scoring

URL Scoring

The URL scoring runs on a Google Cloud Function and can be triggered via HTTPS:

https://europe-west1-gen-medialiteracy-paris2019.cloudfunctions.net/scoreUrl?url=<URL_TO_SCORE>

Please note that you need to perform URL encoding for the url query parameter. The endpoint sends an wildcard * access control header to fully enable CORS requests.

Examples

Reference

Response

{
  "score": -0.5,
  "details": {
    "spamBacklisted": true
  }
}

Score

The score for an URL can be between -1 (highly problematic), 0 (neutral), 1 (no suspicion, inspiring confidence).

Detailed Factors

The final score is determined by weighted checks. The following formula is used to calculate a score: Math.max(Math.min(scorePoints, 100), -100) / 100

  • Spam Blacklisting – blacklisted IP addresses will get 10 points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment