tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

record.py (619B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
      4 
      5 import os
      6 import time
      7 
      8 import dbus
      9 
     10 session_bus = dbus.SessionBus()
     11 session_bus.call_blocking(
     12    "org.gnome.Shell.Screencast",
     13    "/org/gnome/Shell/Screencast",
     14    "org.gnome.Shell.Screencast",
     15    "Screencast",
     16    signature="sa{sv}",
     17    args=[
     18        os.path.join(os.environ.get("ARTIFACT_DIR", ""), "video_%d_%t.webm"),
     19        {"draw-cursor": True, "framerate": 35},
     20    ],
     21 )
     22 
     23 while True:
     24    time.sleep(30)