MCPcopy
hub / github.com/InstaPy/InstaPy / create_firefox_extension

Function create_firefox_extension

instapy/browser.py:42–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41
42def create_firefox_extension():
43 ext_path = os.path.abspath(os.path.dirname(__file__) + sep + "firefox_extension")
44 # safe into assets folder
45 zip_file = use_assets() + sep + "extension.xpi"
46
47 files = ["manifest.json", "content.js", "arrive.js"]
48 with zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEFLATED, False) as zipf:
49 for file in files:
50 zipf.write(ext_path + sep + file, file)
51
52 return zip_file
53
54
55def set_selenium_local_session(

Callers 1

Calls 1

use_assetsFunction · 0.85

Tested by

no test coverage detected