After running a test, the 'Response Data' will display the results. If the test is successful and a video is found, an 'Add Site' button will appear. If the test fails the button will not be shown, and you will need to adjust the settings and try again. Once a site has been added it will be listed in the 'Load Site Profile' section. Adding a site that already exists will not be duplicated, instead it will be overwritten with the new entry.

Site Profile:
The url leading to the page that the video is located on. If the video has to be clicked, or a page naviation needs to take place before getting to the video page, use the css click selectors. Video Page URL:
Choose whether or not to display the browser during testing. Enabling this option allows you to visually inspect the process. Note that the show Browser value is not saved when adding the site, and by default, the browser will be hidden.
Note: The “Show Browser” option is not available on Linux or when running inside Docker. To get a visual view of the process in those environments, click “View Rec.” after the run to watch the recorded session. Show Browser:
The timeout value in seconds for the page operations. This is how long to wait before abandoning the request and returning it as a failed attempt. Page Timeout:

Choosing the right browser is an important step for the overall success of the extraction of the video url.

Firefox: Firefox is the most reliable browser because its fingerprinting looks the most human, making it less likely to be detected as a bot. However, Firefox can be slower when running tasks. When running in 'Show Browser' mode, it is even slower, but it will be faster during a production run.

Chrome: Chrome is much faster than Firefox but is more often identified as a bot by anti-bot detection systems. If you notice HeadlessVidX is being blocked because of a devtool detection script, try adding a string to the blacklist/javascripts-loading.txt that identifies and blocks the script from loading.

Chromium: Chromium is the open-source base of Chrome and behaves almost identically in most cases. It can be a good alternative when Chrome is blocked, but detection rates are generally similar since many anti-bot systems treat Chromium and Chrome the same.

### How to Install Browsers

To install additional browsers for Playwright, first navigate to your project directory using your terminal, command prompt (cmd), or exec environment. Then run `npx playwright install <browser-type>` replacing `<browser-type>` with the one you want to add. Supported types include: chrome, chrome-beta, chrome-dev, chrome-canary, msedge, msedge-beta, msedge-dev, msedge-canary, firefox, webkit, chromium. For example, running `npx playwright install chrome-beta` will install the Chrome Beta channel. More info...

Select Browser:
Enable stealth mode to avoid detection by anti-bot measures. Set this option to true or false. Be aware that some websites can detect the stealth browser, but not the regular browser. If you encounter issues, try switching between stealth mode and the regular browser. Stealth Mode:

The click Selectors provide various methods to target and click the elements on a webpage. You can use general CSS selectors like class, ID, or tag selectors (e.g., .btn-play, #main-content), or you can use XPath selectors to target the elements on the page that requires a click. Running JavaScript on a page is also possible by using the 'javascript:' scheme.

If you need HeadlessVidX to click on multiple items or navigate through pages, you can use a comma to separate the selectors. By using comma-separated selectors can be very helpful, like when you need to interact with several elements on the page, such as navigating through different sections or pages, clicking multiple buttons, or performing a series of actions in a specific order.

Some Examples:

CSS:
`play-btn`

Xpath:
`//*[@id='play-btn']`

Javascript:
`javascript:document.getElementById('play-btn').click();`

Multiple Selectors:
`//*[@id='watch-btn'],//*[@id='play-btn']`
Use a comma to separate multiple selectors. This allows the script to follow a sequence of clicks across different elements. In the example above, the script first clicks the “Watch” button, then searches for and clicks the “Play” button.

OR (||) Selectors:
`//*[@id='watch-movie']||//*[@id='watch-series']`
The double vertical bar (`||`) tells the script to choose whichever selector is available. In this case, it will click either the “Watch Movie” button or the “Watch Series” button, depending on which one appears.

Tip: Try the free version of the SelectorsHub plugin for Chrome and Firefox. By clicking on an element, this tool will automatically generate multiple expressions for you.

Click Selectors:
Brute Click is a feature that uses x and y coordinates to click a specific point on a webpage. This can be useful when you need to interact with an element that cannot be easily targeted with a standard selector. However, for Brute Click to work effectively, at least one Click Selector is required. The Click Selector serves as an element to wait for, ensuring that the page has loaded sufficiently before the x and y coordinates are clicked. Brute Click:
The video URL that needs to be extracted 'must' contain this string, or strings. You can use a list of comma separated strings. Example: If the video I wanted was located at http://example.com/video.mp4 I could use the string 'example'. Any other video files found on the page will be ignored. Video 'Must' Contain:
The returned video URL must 'not' contain this string, or strings. You can use a list of comma separated strings. Example: If an ad video is on the video page located at http://advertise-example.com/video.mp4 I could use 'advertise' to blacklist any video containing that string. Video 'Not' Contain:
If the website hosting the video blocks HeadlessVidX when it uses random user agents, you can set a custom user agent to try and bypass this issue. Many streaming sites employ 'theajack/disable-devtool,' which may cause the browser to close the page immediately. If you encounter this problem try switching the browser to another one, or even switching to a custom useragent like a Googlebot ua has worked. Custom Useragent:
The Referer is the URL of the previous web page from which a link to the current page was followed. Some websites use the referrer information to enhance security and prevent direct access from outside sources. Specify the referrer URL to be included in the request headers if needed. Include Referer:
List resource types to block during the process, separated by commas. HeadlessVidX supports blocking the following resource types: document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, and other. Be careful when blocking 'script' as it may cause the video to not load. Block Resource:
Enable blocking of JavaScript content based on a blacklist. When this option is enabled, the process inspects and searches each loading JavaScript file for strings listed in blacklist/javascripts-contains.txt. Be aware that enabling this feature may slow down the process due to the additional inspection required. Block JS Contains:
Enable ad blocking using the EasyList. When this option is enabled, all URLs are filtered through the Adblock Plus EasyList, which blocks known ad domains and prevents advertisements from loading. This helps to speed up page load times and reduce page distractions from ads. Block Ads:
Replace the body content with an iframe containing the specified URL. Set this option to true or false. Enabling this setting is useful if HeadlessVidX needs to interact with the video player within an iframe. This can be particularly helpful for sites that require embedding the video player to function correctly. Embed Video:
×