Skip to content

Commit

Permalink
No window opens to fetch views
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgear111 committed Dec 19, 2024
1 parent 14671a8 commit 1926c4b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion 1st_image_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://yt3.googleusercontent.com/ChIv0Zlb1L1e9kqrXOvKR7OJGmofRPMGvAERXP5LmzdoFkqlBbKyy-wLHoDSovy6JOGGp-Is
https://yt3.googleusercontent.com/VRwXKVbEg7HVYyV-iK6VnrCDRjQASHlasY2fNiGTtMom5LY0mJMddZp4ZOQrp90gCehYRN09nQ
2 changes: 1 addition & 1 deletion 1st_views.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
580K
103K
2 changes: 1 addition & 1 deletion 2nd_image_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://yt3.googleusercontent.com/0X4Ej5pFH8ZOhCqea05tQLqsysXOeyQy0KSV26FZQda0pGVuD2lfxe9sEA6VwKtmZUx5N0CD5g
https://yt3.googleusercontent.com/mK_WeyiKUly03lO2POJSyMfXTU3baYuBUKsToKGbmvBXX6x1y_SH_DPStpLobPIYMHllRL2FSB0
2 changes: 1 addition & 1 deletion 2nd_views.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
95K
64K
2 changes: 1 addition & 1 deletion 3rd_image_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://yt3.googleusercontent.com/mK_WeyiKUly03lO2POJSyMfXTU3baYuBUKsToKGbmvBXX6x1y_SH_DPStpLobPIYMHllRL2FSB0
https://yt3.googleusercontent.com/447XAt80-ow7poHghoEV2f_0xf-QypVPzTqEFlwVsvijrS56-dpTU3ICge4OP48V8nfk6x5j
2 changes: 1 addition & 1 deletion 3rd_views.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31K
35K
2 changes: 1 addition & 1 deletion 4th_image_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://yt3.googleusercontent.com/447XAt80-ow7poHghoEV2f_0xf-QypVPzTqEFlwVsvijrS56-dpTU3ICge4OP48V8nfk6x5j
https://yt3.googleusercontent.com/pyJrgRJt_77DZ1O_ek96CcfX8BPiEXdoGt8wqPeKfBpk-E8zVplqjj16mHK9EFbIi3wGCO2D3g
2 changes: 1 addition & 1 deletion 4th_views.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27K
34K
11 changes: 9 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
import time

# Setup ChromeOptions for headless mode
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--window-size=1920,1080")

# Setup the WebDriver
service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(service=service)
driver = webdriver.Chrome(service=service, options=chrome_options)

# Open the YouTube Gaming page
driver.get("https://www.youtube.com/gaming/games")
Expand Down Expand Up @@ -70,4 +77,4 @@

finally:
# Close the browser
driver.quit()
driver.quit()

0 comments on commit 1926c4b

Please sign in to comment.