UNPKG

aladinnetwork-blockstack

Version:

The Aladin Javascript library for authentication, identity, and storage.

31 lines (25 loc) 641 B
import cheerio from 'cheerio' import { Service } from './service' class Twitter extends Service { static getBaseUrls() { const baseUrls = [ 'https://twitter.com/', 'http://twitter.com/', 'twitter.com/' ] return baseUrls } static normalizeUrl(proof: any) { return '' } static getProofStatement(searchText: string) { const $ = cheerio.load(searchText) const statement = $('meta[property="og:description"]').attr('content') if (statement !== undefined) { return statement.trim().replace('“', '').replace('”', '') } else { return '' } } } export { Twitter }