test updated

pull/231/head
Yariv Menachem 2024-12-17 19:08:55 +02:00
parent 7971d0fab7
commit 0565c0ed16
1 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,8 @@ from jobspy import scrape_jobs
import pandas as pd
from jobspy.scrapers.goozali.GoozaliMapper import GoozaliMapper
from jobspy.scrapers.goozali.model import GoozaliResponse
from jobspy.scrapers.goozali.GoozaliScrapperComponent import GoozaliScrapperComponent
from jobspy.scrapers.goozali.model.GozaaliResponseData import GoozaliResponseData
# URL Example
# https://airtable.com/v0.3/view/viwagEIbkfz2iMsLU/readSharedViewData?stringifiedObjectParams=%7B%22shouldUseNestedResponseFormat%22%3Atrue%7D&requestId=reqXyRSHWlXyiRgY9&accessPolicy=%7B%22allowedActions%22%3A%5B%7B%22modelClassName%22%3A%22view%22%2C%22modelIdSelector%22%3A%22viwagEIbkfz2iMsLU%22%2C%22action%22%3A%22readSharedViewData%22%7D%2C%7B%22modelClassName%22%3A%22view%22%2C%22modelIdSelector%22%3A%22viwagEIbkfz2iMsLU%22%2C%22action%22%3A%22getMetadataForPrinting%22%7D%2C%7B%22modelClassName%22%3A%22view%22%2C%22modelIdSelector%22%3A%22viwagEIbkfz2iMsLU%22%2C%22action%22%3A%22readSignedAttachmentUrls%22%7D%2C%7B%22modelClassName%22%3A%22row%22%2C%22modelIdSelector%22%3A%22rows%20*%5BdisplayedInView%3DviwagEIbkfz2iMsLU%5D%22%2C%22action%22%3A%22createDocumentPreviewSession%22%7D%5D%2C%22shareId%22%3A%22shr97tl6luEk4Ca9R%22%2C%22applicationId%22%3A%22app5sYJyDgcRbJWYU%22%2C%22generationNumber%22%3A0%2C%22expires%22%3A%222025-01-02T00%3A00%3A00.000Z%22%2C%22signature%22%3A%223aa292ee44d15aa75d9506200329e413653471f89e000fa370ef9fa38393070a%22%7D
@ -17,9 +18,17 @@ try:
test_json_response = json.load(file)
print(test_json_response['msg']) # Output: Success
mapper = GoozaliMapper()
response = mapper._map_dict_to_goozali_response_data(
response_data: GoozaliResponseData = mapper._map_dict_to_goozali_response_data(
test_json_response['data'])
print("ya gever!!")
component = GoozaliScrapperComponent()
hours_old = 200
field_cloumn = component.find_column(response_data.columns, "Field")
software_engineering_choice = component.find_choice_from_column(
field_cloumn, "Software Engineering")
filtered_rows_by_age = component.filter_rows_by_hours(
response_data.rows, hours_old)
except FileNotFoundError:
print("The file was not found.")
except json.JSONDecodeError: