from adb import Device import pyperclip def open_youtube(Device, link): Device.shell(*('am start -a android.intent.action.VIEW'.split(' ')), link) if __name__ == "__main__": d = Device.prim_device() open_youtube(d, pyperclip.paste())