-
-
Save pcarrier/606545b6e8049ca04515fcb9f04f4be4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> node scrape.js pcarrier | |
{ | |
"account": { | |
"id": 50511100, | |
"uuid": "18904bba-bf13-4f16-b86b-c031ca6ffd36", | |
"username": "pcarrier", | |
"isActive": true, | |
"profilePictureUrl": null, | |
"avatarMode": "CIRCLE_SMALL", | |
"backgroundHeroColor": null, | |
"pageTitle": "@pcarrier", | |
"googleAnalyticsId": null, | |
"facebookPixelId": null, | |
"tiktokPixelId": null, | |
"donationsActive": false, | |
"causeBanner": null, | |
"contentWarning": null, | |
"description": null, | |
"isLogoVisible": true, | |
"socialLinksPosition": "BOTTOM", | |
"useSignupLink": false, | |
"createdAt": 1656456775000, | |
"updatedAt": 1715518663000, | |
"expandableLinkCaret": true, | |
"defaultProfilePage": "LINKS", | |
"verticals": [ | |
"internet-technology" | |
], | |
"customAvatar": null, | |
"customAvatarAttributes": null, | |
"backgroundImageAttributes": null, | |
"profileBadges": null, | |
"isVenmoEnabled": true, | |
"isSquareWalletEnabled": true, | |
"isCookieBannerEnabled": true, | |
"isInitialsProfileEnabled": true, | |
"isWhatsappNotificationsEnabled": true, | |
"isShareLinksEnabled": true, | |
"isOnlyfansSEOEnabled": false, | |
"isShareWithEllipsis": true, | |
"linkTypesForSEO": null, | |
"manualTitleTag": null, | |
"dynamicMetaTitle": "@pcarrier | Linktree", | |
"dynamicMetaDescription": "Linktree. Make your link do more.", | |
"enableDynamicProfilePageMetadata": true, | |
"linkPlatforms": [], | |
"activeGates": [], | |
"isAmazonAffiliateEnabled": true, | |
"profileLinkContentDisplayType": "default", | |
"complementaryThemeProperties": false, | |
"timezone": "Europe/Paris", | |
"profileDirectoryVerticalUrl": "/discover/profile-directory/c/tech", | |
"groupsEnabled": false, | |
"showSignupOption": true, | |
"footerCtaButton": "buttonToHome", | |
"isSnapchatSocialShareEnabled": true, | |
"isReportLinktreeEnabled": true, | |
"getDynamicMetaTitleVariation": 0, | |
"isVisualLinkPreviewsEnabled": true, | |
"isShareLinkPreviewEnabled": false, | |
"isShareLinkPreviewVScraperEnabled": false, | |
"isStoreTabEnabled": false, | |
"isProfilePreviewsLinkAppsEnabled": false, | |
"canAccessMonetizationTab": true, | |
"eligibleForMonetization": "RESTRICTED", | |
"affiliateTokens": [], | |
"ownedBy": { | |
"id": 50810724, | |
"uuid": "3214c580-4c9f-40a0-9c09-0d25cc68b9f0", | |
"isEmailVerified": true | |
}, | |
"pageMeta": null, | |
"integrations": [], | |
"links": [ | |
{ | |
"id": 385045174, | |
"type": "EMAIL", | |
"title": "pc@rrier.fr", | |
"position": 0, | |
"url": "mailto:pc@rrier.fr", | |
"shouldRouteToProfile": false, | |
"modifiers": { | |
"animation": null, | |
"isForwarding": false, | |
"isForwardingActive": false, | |
"thumbnailUrl": null, | |
"amazonAffiliate": null, | |
"layoutOption": "stack" | |
}, | |
"context": { | |
"embedOption": "LINK_OFF" | |
}, | |
"rules": { | |
"gate": { | |
"activeOrder": [], | |
"sensitiveContent": { | |
"domain": "" | |
}, | |
"age": null, | |
"passcode": null, | |
"nft": null, | |
"payment": null | |
} | |
}, | |
"metadata": null, | |
"parent": null | |
}, | |
{ | |
"id": 240171796, | |
"type": "CLASSIC", | |
"title": "Everything", | |
"position": 1, | |
"url": "https://pcarrier.com", | |
"shouldRouteToProfile": false, | |
"modifiers": { | |
"animation": null, | |
"isForwarding": false, | |
"isForwardingActive": false, | |
"thumbnailUrl": null, | |
"amazonAffiliate": null, | |
"layoutOption": null | |
}, | |
"context": {}, | |
"rules": { | |
"gate": { | |
"activeOrder": [], | |
"sensitiveContent": { | |
"domain": "" | |
}, | |
"age": null, | |
"passcode": null, | |
"nft": null, | |
"payment": null | |
} | |
}, | |
"metadata": null, | |
"parent": null | |
} | |
], | |
"socialLinks": [], | |
"theme": { | |
"key": "lake-white" | |
}, | |
"themeV2": { | |
"key": "lake-white", | |
"luminance": "LIGHT", | |
"background": { | |
"type": "DEFAULT" | |
}, | |
"buttonStyle": { | |
"type": "DEFAULT", | |
"backgroundStyle": { | |
"color": "#ffffff" | |
}, | |
"shadowStyle": { | |
"color": "#000000" | |
}, | |
"textStyle": { | |
"color": "#000000" | |
} | |
}, | |
"typeface": { | |
"color": "#000000", | |
"family": "inter regular" | |
} | |
} | |
}, | |
"theme": { | |
"key": "lake-white", | |
"mode": "light", | |
"colors": { | |
"body": "#000", | |
"linkBackground": "rgba(255,255,255,0.8)", | |
"linkText": "#000", | |
"linkShadow": "#000" | |
}, | |
"components": { | |
"SignupSubmitButton": { | |
"borderLeftWidth": "2px", | |
"borderLeftColor": "rgba(0,0,0, 0.1)" | |
}, | |
"ProfileBackground": { | |
"backgroundColor": "#fff", | |
"backgroundStyle": "noise" | |
}, | |
"ProfileDescription": { | |
"color": "rgba(0,0,0, 0.6)" | |
}, | |
"LinkContainer": { | |
"borderRadius": "4px", | |
"gridBorderRadius": "4px", | |
"embedContentRadius": "4px", | |
"styleType": "fill-scale-shadow" | |
}, | |
"LinkHeader": { | |
"color": "body" | |
}, | |
"LinkThumbnail": { | |
"borderRadius": "4px", | |
"size": "48px" | |
}, | |
"SocialLink": { | |
"fill": "#000" | |
}, | |
"Banner": { | |
"default": { | |
"backgroundColor": "linkBackground", | |
"color": "linkText" | |
} | |
}, | |
"Footer": { | |
"logo": "black" | |
} | |
} | |
}, | |
"isProfileVerified": true, | |
"hasConsentedToView": true, | |
"username": "pcarrier", | |
"pageTitle": "@pcarrier", | |
"description": null, | |
"socialLinks": [], | |
"integrations": [], | |
"seoSchemaClassifications": { | |
"typeClassification": null | |
}, | |
"metaTitle": "@pcarrier | Linktree", | |
"metaDescription": "Linktree. Make your link do more.", | |
"profilePictureUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAMFBMVEXD9uE54Ju69d1c5q2h8dB+675T5KiP7sdt6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|
{ | |
"id": "385045174", | |
"title": "pc@rrier.fr", | |
"context": { | |
"embedOption": "LINK_OFF" | |
}, | |
"animation": null, | |
"thumbnail": null, | |
"url": "mailto:pc@rrier.fr", | |
"amazonAffiliate": null, | |
"type": "EMAIL", | |
"rules": { | |
"gate": { | |
"activeOrder": [], | |
"sensitiveContent": { | |
"domain": "" | |
}, | |
"age": null, | |
"passcode": null, | |
"nft": null, | |
"payment": null | |
} | |
}, | |
"position": 0, | |
"locked": null, | |
"parent": null, | |
"children": [], | |
"layoutOption": "stack", | |
"metaData": null | |
}, | |
{ | |
"id": "240171796", | |
"title": "Everything", | |
"context": {}, | |
"animation": null, | |
"thumbnail": null, | |
"url": "https://pcarrier.com", | |
"amazonAffiliate": null, | |
"type": "CLASSIC", | |
"rules": { | |
"gate": { | |
"activeOrder": [], | |
"sensitiveContent": { | |
"domain": "" | |
}, | |
"age": null, | |
"passcode": null, | |
"nft": null, | |
"payment": null | |
} | |
}, | |
"position": 1, | |
"locked": null, | |
"parent": null, | |
"children": [], | |
"layoutOption": "stack", | |
"metaData": null | |
} | |
], | |
"leapLink": null, | |
"isOwner": false, | |
"isLogoVisible": true, | |
"footerCtaButtonVariation": "buttonToHome", | |
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", | |
"stage": "production", | |
"storeProducts": [], | |
"storeCollections": [], | |
"environment": { | |
"LINK_TYPES_ASSETS_ENDPOINT": "https://link-types-assets.production.linktr.ee", | |
"STRIPE_PAYMENTS_API_ENDPOINT": "https://stripe-payments.linktr.ee", | |
"STRIPE_PUBLISHABLE_KEY": "pk_live_51IdFBuL9SYJKPuFO2CTt5Wrpw46qcwd1ZjWC4MLOYi1aUXIfhfRbK7EkDJgMVQVaTcOceuPpCEnkv0g7J6TgkNdD00TD9bsb4o", | |
"PAYPAL_PAYMENTS_API_ENDPOINT": "https://paypal-payments.linktr.ee", | |
"PAYPAL_PAYMENTS_CLIENT_ID": "ATsU006_NqnC_Jk_W49YoQSnMh9kDXgMY_IVkUhJbutOkhQ7F8wlTWoJHyi2GteXaczfOGu22BSdWopq", | |
"SHOPIFY_INTEGRATIONS_API_ENDPOINT": "https://shopify-integrations.linktr.ee", | |
"META_IMAGE_URL": "https://assets.production.linktr.ee/profiles/_next/static/logo-assets/default-meta-image.png", | |
"RECAPTCHA_SITE_KEY": "6LdGYT4cAAAAANW9oE1Sa2AxBi8b9ZAbmvYBPnZm", | |
"RECAPTCHA_SITE_KEY_INVISIBLE": "6LcGlm0dAAAAAMfsVsJl3MZtjI-cKhBYzq5RPEo4", | |
"GRAPHQL_API_ENDPOINT": "https://graph.linktr.ee/graphql", | |
"PROFILES_API_HOST": "https://profiles-api.production.linktr.ee", | |
"LINKER_RECOMMENDATIONS_ENDPOINT": "https://api.linktr.ee/recommendations", | |
"BASE_PROFILE_URL": "https://linktr.ee", | |
"CDN_DISTRIBUTION_URL": "https://assets.production.linktr.ee/profiles/" | |
}, | |
"contentGating": "none", | |
"videoStructuredData": [], | |
"hasSensitiveContent": false, | |
"auth0Config": { | |
"clientID": "rdPMLphw1ztUXo52bXtf3ah07kSUWguy", | |
"domain": "auth.linktr.ee", | |
"redirectUri": "https://linktr.ee/auth/callback", | |
"responseType": "token id_token", | |
"responseMode": "form_post", | |
"audience": "https://linktr.ee/api" | |
}, | |
"followerNotificationsEnabled": false, | |
"followerCapabilities": null, | |
"isPreview": false, | |
"statsigInitValues": { | |
"featureGates": { | |
"profilepage_structured_data": true | |
}, | |
"experiments": {}, | |
"layers": { | |
"profile--signup--profile_signup_cta": { | |
"signup_cta_label": "linktr.ee/you", | |
"signup_cta_background_color": "#000", | |
"below_cta_text_color": "white", | |
"below_cta_text": "Join {username} on Linktree today", | |
"signup_cta_animation_type": "wobble" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parse } from 'node-html-parser'; | |
async function scrape(n) { | |
const resp = await fetch(`https://linktr.ee/${n}`); | |
if (!resp.ok) { throw new Error(`Failed to fetch ${n}`); } | |
const body = await resp.text(); | |
return JSON.parse(parse(body).querySelector('#__NEXT_DATA__').rawText).props.pageProps; | |
} | |
process.argv.slice(2).forEach((n) => { | |
scrape(n).then((data) => console.log(JSON.stringify(data, null, 2))); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment