Generation

generate functionTue, 27 Jun 2023

find download link from pornhub.com

import { getPage } from './common' async function getLink(index: number) { const url = `https://www.pornhub.com/view_video.php?viewkey=${index}` const ret = await getPage(url) const match = /"quality_720p":"(http.+?)"/.exec(ret) if (match) { return match[1].replace(/\\u002F/g, '/').replace(/\\/g, '') } return '' } export default getLink

TypeScript
Generate More

Questions about programming?Chat with your personal AI assistant