📜  youtube 查看机器人 python 代码 pastebin - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:43.283000             🧑  作者: Mango

代码示例1
## https://www.youtube.com/watch?v=jn_PrmDUfOk          HACKHUT
import webbrowser
import time 
import os 
 
url = input("Enter the youtube URL:")
refresh = input("Enter the refresh time in seconds:")
count = input("How many views do you want? ")
 
def openURL():
    webbrowser.open(url)
    time.sleep(int(refresh))
    
    for i in range(int(count)):
        print("Webpage has been viewed")
        openURL()
 
openURL()