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
// what is AVM? | |
const sleep = (n) => new Promise((resolve) => setTimeout(resolve, n)); | |
async function getAboveTheFold(propertyId) { | |
const r = await fetch(`https://www.redfin.com/stingray/api/home/details/aboveTheFold?propertyId=${propertyId}&accessLevel=1`); | |
const t = await r.text(); | |
const data = JSON.parse(t.replace('{}&&', '')); | |
const payload = data.payload; | |
const addressSectionInfo = payload.addressSectionInfo; |
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
async function screenCap(duration) { | |
function _startScreenCapture() { | |
if (navigator.getDisplayMedia) { | |
return navigator.getDisplayMedia({video: true}); | |
} else { | |
return navigator.mediaDevices.getUserMedia({video: {mediaSource: 'screen'}}); | |
} | |
} | |
const stream = await _startScreenCapture(); |