mirror of https://github.com/Bunsly/JobSpy
changed some import, pycharm could recognize jobspy
parent
0189ecb0ff
commit
2d98eb6c1c
|
@ -5,7 +5,7 @@ import pandas as pd
|
|||
from typing import Tuple
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
from jobspy.scrapers.site import Site
|
||||
from .scrapers.site import Site
|
||||
|
||||
from .scrapers.goozali import GoozaliScraper
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from dotenv import load_dotenv
|
|||
from pymongo import MongoClient, UpdateOne
|
||||
import pymongo
|
||||
|
||||
from jobspy.jobs import JobPost
|
||||
from ..jobs import JobPost
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import asyncio
|
||||
import re
|
||||
from jobspy import Site, scrape_jobs
|
||||
from jobspy.db.job_repository import JobRepository
|
||||
from jobspy.jobs import JobPost
|
||||
from jobspy.scrapers.utils import create_logger
|
||||
from jobspy.telegram_bot import TelegramBot
|
||||
from src.jobspy import Site, scrape_jobs
|
||||
from src.jobspy.db.job_repository import JobRepository
|
||||
from src.jobspy.jobs import JobPost
|
||||
from src.jobspy.scrapers.utils import create_logger
|
||||
from src.jobspy.telegram_bot import TelegramBot
|
||||
|
||||
logger = create_logger("Main")
|
||||
filter_by_title: list[str] = ["test", "qa", "Lead", "Full-Stack", "Full Stack", "Fullstack", "Frontend", "Front-end", "Front End", "DevOps", "Physical", "Staff",
|
||||
|
@ -25,7 +25,7 @@ async def main():
|
|||
telegramBot = TelegramBot()
|
||||
jobRepository = JobRepository()
|
||||
# sites_to_scrap = [Site.LINKEDIN, Site.GLASSDOOR, Site.INDEED, Site.GOOZALI]
|
||||
sites_to_scrap = [Site.LINKEDIN]
|
||||
sites_to_scrap = [Site.GOOZALI]
|
||||
# sites_to_scrap = [Site.GOOZALI]
|
||||
jobs = scrape_jobs(
|
||||
site_name=sites_to_scrap,
|
||||
|
|
|
@ -2,8 +2,7 @@ from __future__ import annotations
|
|||
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from jobspy.scrapers.site import Site
|
||||
|
||||
from .site import Site
|
||||
from ..jobs import (
|
||||
Enum,
|
||||
BaseModel,
|
||||
|
|
|
@ -15,7 +15,7 @@ from typing import List, Optional, Tuple
|
|||
from datetime import datetime, timedelta
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
from jobspy.scrapers.glassdoor.GlassDoorLocation import GlassDoorLocationResponse, get_location_id, get_location_type
|
||||
from .GlassDoorLocation import GlassDoorLocationResponse, get_location_id, get_location_type
|
||||
|
||||
from .constants import fallback_token, query_template, headers
|
||||
from .. import Scraper, ScraperInput, Site
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from datetime import datetime
|
||||
import json
|
||||
|
||||
from jobspy.jobs import JobPost, Location
|
||||
from jobspy.scrapers.goozali.model import GoozaliColumnTypeOptions, GoozaliResponse, GoozaliRow, GoozaliColumn, GoozaliColumnChoice, GoozaliResponseData
|
||||
from src.jobspy.jobs import JobPost, Location
|
||||
from .model import GoozaliColumnTypeOptions, GoozaliResponse, GoozaliRow, GoozaliColumn, GoozaliColumnChoice, GoozaliResponseData
|
||||
from .constants import job_post_column_to_goozali_column, job_post_column_names
|
||||
|
||||
# Mapping function to convert parsed dictionary into GoozaliResponseData
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
from jobspy.scrapers.goozali.model import GoozaliRow, GoozaliColumn, GoozaliColumnChoice
|
||||
from jobspy.scrapers.utils import create_logger
|
||||
from .model import GoozaliRow, GoozaliColumn, GoozaliColumnChoice
|
||||
from ..utils import create_logger
|
||||
|
||||
# Mapping function to convert parsed dictionary into GoozaliResponseData
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ from __future__ import annotations
|
|||
|
||||
|
||||
from .. import Scraper, ScraperInput
|
||||
from jobspy.scrapers.goozali.GoozaliMapper import GoozaliMapper
|
||||
from jobspy.scrapers.goozali.GoozaliScrapperComponent import GoozaliScrapperComponent
|
||||
from jobspy.scrapers.goozali.constants import extract_goozali_column_name, job_post_column_to_goozali_column
|
||||
from jobspy.scrapers.goozali.model import GoozaliColumn, GoozaliFieldChoice, GoozaliPartRequest, GoozaliFullRequest
|
||||
from jobspy.scrapers.site import Site
|
||||
from .GoozaliMapper import GoozaliMapper
|
||||
from .GoozaliScrapperComponent import GoozaliScrapperComponent
|
||||
from .constants import extract_goozali_column_name, job_post_column_to_goozali_column
|
||||
from .model import GoozaliColumn, GoozaliFieldChoice, GoozaliPartRequest, GoozaliFullRequest
|
||||
from ..site import Site
|
||||
|
||||
from ..utils import create_dict_by_key_and_value, create_session, create_logger
|
||||
from ...jobs import (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from jobspy.scrapers.goozali.model import GoozaliColumn
|
||||
from .model import GoozaliColumn
|
||||
|
||||
|
||||
job_post_column_to_goozali_column = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
|
||||
from jobspy.scrapers.goozali.model import GoozaliColumnTypeOptions
|
||||
from . import GoozaliColumnTypeOptions
|
||||
|
||||
|
||||
class GoozaliColumn:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from jobspy.scrapers.goozali.model import GoozaliColumnChoice
|
||||
from . import GoozaliColumnChoice
|
||||
|
||||
|
||||
class GoozaliColumnTypeOptions:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from jobspy.scrapers.goozali.model import GoozaliResponseData
|
||||
from . import GoozaliResponseData
|
||||
|
||||
|
||||
class GoozaliResponse:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from jobspy.scrapers.goozali.model import GoozaliRow, GoozaliColumn
|
||||
from . import GoozaliRow, GoozaliColumn
|
||||
|
||||
|
||||
class GoozaliResponseData:
|
||||
|
|
|
@ -2,8 +2,8 @@ import os
|
|||
from dotenv import load_dotenv
|
||||
from telegram import Bot
|
||||
|
||||
from jobspy.jobs import JobPost
|
||||
from jobspy.scrapers.utils import create_logger
|
||||
from .jobs import JobPost
|
||||
from .scrapers.utils import create_logger
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
from jobspy.jobs import JobPost
|
||||
from jobspy.scrapers.goozali.GoozaliMapper import GoozaliMapper
|
||||
from jobspy.scrapers.goozali.GoozaliScrapperComponent import GoozaliScrapperComponent
|
||||
from jobspy.scrapers.goozali.constants import extract_goozali_column_name, job_post_column_to_goozali_column
|
||||
from jobspy.scrapers.goozali.model import GoozaliColumn, GoozaliFieldChoice, GoozaliResponseData
|
||||
from jobspy.scrapers.utils import create_dict_by_key_and_value
|
||||
from src.jobspy.jobs import JobPost
|
||||
from src.jobspy.scrapers.goozali.GoozaliMapper import GoozaliMapper
|
||||
from src.jobspy.scrapers.goozali.GoozaliScrapperComponent import GoozaliScrapperComponent
|
||||
from src.jobspy.scrapers.goozali.constants import extract_goozali_column_name, job_post_column_to_goozali_column
|
||||
from src.jobspy.scrapers.goozali.model import GoozaliColumn, GoozaliFieldChoice, GoozaliResponseData
|
||||
from src.jobspy.scrapers.utils import create_dict_by_key_and_value
|
||||
# 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue