# StreamAsync Javascript mode ```{note} For more examples see the [Modules Repo](https://github.com/50n50/sources) ``` In the streamAsyncJS mode you extract the stream URL asynchronously instead of regular scraping. The function will still be provided with an HTML code. ## Functions ### searchResults Input: `HTML` \ Output:`JSON` Extracts the search results from the provided HTML. ```json { "title": "Example Title", "image": "https://example.com/image.jpg", "href": "https://grani.me/example" } ``` ### extractDetails Input: `HTML` \ Output:`JSON` Extracts the details from the provided HTML. ```json { "description": "An exciting anime series about adventures.", "aliases": "Alternate Name", "airdate": "2022" } ``` ### extractEpisodes Input: `HTML` \ Output:`JSON` Extracts the episodes from the provided HTML. ```json { "href": "https://grani.me/episode/123", "number": "1" } ``` ### extractStreamUrl Input: `HTML` \ Output:`URL` Extracts the stream from the provided URL. ```txt https://example.com/stream/video.mp4 ``` ## Example ```javascript function searchResults(html) { const results = []; const titleRegex = /
([\s\S]*?)<\/p>/); let description = descriptionMatch ? descriptionMatch[1].trim() : ''; const airdateMatch = html.match(/