Skip to content

Commit

Permalink
developing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrian Gasper authored and Andrian Gasper committed Jan 18, 2024
1 parent 0f3b53e commit 5a8049e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pandas as pd
import time
from cognite.client import CogniteClient
from authenticate import client as c
from scraper import scraper
from variables import DATABASE_NAME, TABLE_NAME, ID_COLUMN_NAME
from variables import PRICE_MAX_MAX, PRICE_MAX_MIN, PRICE_MIN_MAX, PRICE_MIN_MIN, PRICE_STEP, PRICE_CEILING, TIMEOUT_TIME, MAX_NR_OF_PAGES
Expand Down Expand Up @@ -65,12 +64,13 @@ def handle(client: CogniteClient):
if time.time() - start_time > TIMEOUT_TIME:
print(f"Timeout time reached. Scraped {len_scraped_data} rows.")
break

len_scraped_data += main(client, nr_of_pages=MAX_NR_OF_PAGES, price_from=range_[0], price_to=range_[1])

return len_scraped_data



if __name__ == "__main__":
from authenticate import client as c
handle(c)

0 comments on commit 5a8049e

Please sign in to comment.