mirror of
https://github.com/FranP-code/classify_saved_videos_yt.git
synced 2025-10-13 00:32:25 +00:00
fixing one reference error
This commit is contained in:
@@ -4,6 +4,8 @@ from pynput import keyboard as kb
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
playlist_url = 'https://www.youtube.com/playlist?list=WL'
|
||||||
|
|
||||||
quit = False
|
quit = False
|
||||||
|
|
||||||
half_left = (
|
half_left = (
|
||||||
@@ -86,7 +88,7 @@ def change_to_not_available():
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print(f"Critical error in change_to_not_available: {e}")
|
print(f"Critical error in change_to_not_available")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@@ -104,7 +106,7 @@ except Exception as e:
|
|||||||
|
|
||||||
# Open YouTube
|
# Open YouTube
|
||||||
pgui.hotkey('ctrl', 't')
|
pgui.hotkey('ctrl', 't')
|
||||||
pgui.write('https://www.youtube.com/playlist?list=WL')
|
pgui.write(playlist_url)
|
||||||
pgui.press("enter")
|
pgui.press("enter")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
@@ -116,13 +118,12 @@ if __name__ == '__main__':
|
|||||||
if counter > 0 and (counter % 90) == 0:
|
if counter > 0 and (counter % 90) == 0:
|
||||||
pgui.hotkey('ctrl', 'w')
|
pgui.hotkey('ctrl', 'w')
|
||||||
pgui.hotkey('ctrl', 't')
|
pgui.hotkey('ctrl', 't')
|
||||||
pgui.write('https://www.youtube.com/playlist?list=WL')
|
pgui.write(playlist_url)
|
||||||
pgui.press("enter")
|
pgui.press("enter")
|
||||||
time.sleep(8)
|
time.sleep(8)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
success = locate_img('options.png', sleep_time=0.2, confidence=0.8, gray_scale=True, region=half_right)
|
success = locate_img('options.png', sleep_time=0.2, confidence=0.8, gray_scale=True, region=half_right)
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
|
|||||||
Reference in New Issue
Block a user