Firefox addons

Import Firefox extensions into a Browser instance

Firefox extensions can be easily imported into a browser session. Some potentially useful extensions include:

  • uBlock Origin - Ad & popup blocker (Automatically installed)

  • hektCaptcha - Hcaptcha solver (Download)

  • FastForward - Bypass & skip link redirects (Download)

Hrequests only supports Firefox extensions.

Due to limitations in Playwright, Hrequests only supports adding addons to Firefox. Hrequests will throw an error if you attempt to pass the extensions parameter to a Chrome BrowserSession.

Extensions are added with the extensions parameter:

  • This can be an list of absolute paths to unpacked extensions:

    with resp.render(extensions=['C:\\extensions\\hektcaptcha', 'C:\\extensions\\fastforward']):

Note that these need to be unpacked extensions. You can unpack a .xpi file by changing the file extension to .zip and extracting the contents.

Usage example of using a captcha solver:

>>> resp = hrequests.get('https://accounts.hcaptcha.com/demo', browser='firefox')
>>> with resp.render(extensions=['C:\\extensions\\hektcaptcha']) as page:
...     page.awaitSelector('.hcaptcha-success')  # wait for captcha to finish
...     page.click('input[type=submit]')

Last updated