Scrapp Zero | Home
const PRISM_API_KEY = 'prism_jrfvXGHXOMscbgOD7NrcMgO5K2oQ4OqZ'; const PRISM_ENDPOINT = 'https://prism.trakkr.ai'; const PRISM_TIMEOUT = 1000; // ms // Crawler patterns to optimize for (customizable) const AI_CRAWLERS = [ 'gptbot', 'chatgpt-user', 'oai-searchbot', 'claudebot', 'claude-user', 'claude-searchbot', 'perplexitybot', 'meta-externalagent', 'google-extended', 'cohere-ai', 'applebot-extended', 'amazonbot', 'baiduspider', 'bytespider' ]; addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { const url = new URL(request.url); // Quick bypass for non-HTML requests if (url.pathname.match(/\.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot)$/i)) { return fetch(request); } // Check if AI crawler const ua = (request.headers.get('user-agent') || '').toLowerCase(); const isAICrawler = AI_CRAWLERS.some(bot => ua.includes(bot)); if (!isAICrawler) { return fetch(request); } // Detect crawler type const crawlerType = AI_CRAWLERS.find(bot => ua.includes(bot)) || 'unknown'; try { // Call Prism API with tight timeout const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), PRISM_TIMEOUT); const prismResponse = await fetch(PRISM_ENDPOINT, { method: 'POST', headers: { 'X-API-Key': PRISM_API_KEY, 'X-Crawler-UA': ua.substring(0, 200), 'X-Target-URL': url.toString(), 'Content-Type': 'application/json' }, body: JSON.stringify({ url: url.toString(), pathname: url.pathname, crawler: crawlerType }), signal: controller.signal }); clearTimeout(timeoutId); // Handle rate limiting if (prismResponse.status === 429) { console.log('Prism limit reached'); return fetch(request); } // Handle successful optimization if (prismResponse.ok) { const data = await prismResponse.json(); if (data.optimizedHTML) { return new Response(data.optimizedHTML, { status: 200, headers: { 'Content-Type': 'text/html;charset=UTF-8', 'X-Prism-Optimized': 'true', 'X-Prism-Cache': data.cache || 'MISS' } }); } } } catch (error) { // Timeout or error - serve original immediately console.error('Prism error:', error.message); } // Default: serve original content return fetch(request); }
Team Announcement

Scrapp is now a B-Corporation!

Evan Gwynne Davies
May 30, 2024
2 minutes

Scrapp Celebrates a New Milestone: Achieving B-Corp Certification!

We are thrilled to announce a significant milestone in Scrapp's journey towards sustainable business practices: we have officially become a certified B Corporation! This certification is not just a badge; it's a testament to our commitment to balancing profit with our planet's well-being and societal benefit.

What Does Being a B-Corp Mean?

B-Corp certification is awarded to companies that meet the highest standards of verified social and environmental performance, public transparency, and legal accountability to balance profit and purpose. By achieving this certification, Scrapp Inc. joins a global community of leaders using business as a force for good. You can learn more from the video below 👇

How Scrapp Achieved B-Corp Status

Achieving B-Corp status was no small feat. It required rigorous assessments of our social and environmental impact across various aspects, including governance, workers, community, environment, and customers. Our efforts in reducing waste, enhancing recycling processes, and promoting sustainability in every part of our operation were thoroughly evaluated and recognized.

The Impact of B-Corp on Our Business and Community

As a B-Corp, Scrapp Inc. is committed to continuous improvement in our sustainability practices. This certification strengthens our resolve to help businesses track their waste effectively, optimize their recycling efforts, and reduce their environmental footprint. We are now more equipped than ever to deliver on our promise of making recycling simple, efficient, and accessible to all. You can see our new impact page here.

Looking Forward: Scrapp's Plans

With this new status, Scrapp plans to leverage the power of our network and the collective expertise of other B-Corps. We aim to amplify our impact by fostering collaborations that drive systemic change. This certification is not the end but a new beginning to influence and inspire businesses to join us in this crucial movement towards sustainability.

We invite our community to learn more about our B-Corp journey and join us as we continue to innovate and lead in the recycling and waste management industry. Together, we can make a significant impact on our planet and its people, one step at a time!

Article by
Evan Gwynne Davies