Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
sleep 2 seconds for scroll_down function has better performance
Browse files Browse the repository at this point in the history
ImanMontajabi committed May 19, 2024
1 parent 199ff7c commit ea62f68
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RAPGOAT/soundcloud_stats.py
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ def scroll_down(driver, url: str) -> None:
while True:
driver.execute_script('window.scrollBy(0, 350);')
# this variable changes scrawling speed
sleep(1)
sleep(2)
if driver.execute_script('return window.innerHeight + \
window.pageYOffset >= document.body.offsetHeight'):
try:
4 changes: 4 additions & 0 deletions RAPGOAT/tables_to_csv.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@
import sqlite3



# TODO: set null for not exist data


def get_database_dir() -> str:
path = os.getcwd()
database_dir = path + '/RapGoat.db'

0 comments on commit ea62f68

Please sign in to comment.