-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0fb3da
commit beccb4e
Showing
11 changed files
with
423 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/docker-existing-dockerfile | ||
{ | ||
"name": "Existing Dockerfile", | ||
|
||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
|
||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerFile": "../Dockerfile" | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Uncomment the next line to run commands after the container is created - for example installing curl. | ||
// "postCreateCommand": "apt-get update && apt-get install -y curl", | ||
|
||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust | ||
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
|
||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. | ||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], | ||
|
||
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. | ||
// "remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM python:3.9 | ||
|
||
# Setting Up Google Chrome | ||
|
||
# Adding trusting keys to apt for repositories | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | ||
# Adding Google Chrome to the repositories | ||
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | ||
# Updating apt to see and install Google Chrome | ||
RUN apt-get -y update | ||
# Magic happens | ||
RUN apt-get install -y google-chrome-stable | ||
|
||
# Installing Chrome Driver | ||
|
||
# Installing Unzip | ||
RUN apt-get install -yqq unzip | ||
# Download the Chrome Driver | ||
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip | ||
# Unzip the Chrome Driver into /usr/local/bin directory | ||
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ | ||
# Set display port as an environment variable | ||
ENV DISPLAY=:99 | ||
|
||
RUN apt-get install -qq -y cron | ||
|
||
COPY src src | ||
COPY requirements.txt . | ||
|
||
RUN pip install -r requirements.txt | ||
RUN python src/scrape_jobs.py | ||
RUN src/schedule_cron.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# spotify-jobs | ||
|
||
|
||
docker build -t scrape_jobs:v01 . | ||
|
||
docker run --name scrape_jobs -it scrape_jobs:v01 | ||
|
||
docker exec -t -i scrape_jobs bash |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
role,location,url | ||
"Associate Analytics Engineer, Direct Guaranteed, Ads R&D",New York or Remote Americas,https://www.lifeatspotify.com/jobs/associate-analytics-engineer-direct-guaranteed-ads-rd | ||
"Associate Analytics Engineer, Direct Guaranteed, Ads R&D",,https://www.lifeatspotify.com/jobs/associate-analytics-engineer-direct-guaranteed-ads-rd |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pandas | ||
requests | ||
selenium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/sh | ||
|
||
(crontab -l && echo "0 8,12,18 * * * python ~/spotify-jobs/src/scrape_jobs.py") | crontab - | ||
|
||
(crontab -l && echo "15 8,12,18 * * * python ~/spotify-jobs/src/run_telegram_bot.py") | crontab - | ||
(echo "0 8,12,18 * * * python /src/scrape_jobs.py" && echo "15 8,12,18 * * * python /src/run_telegram_bot.py") | crontab - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from requests import get | ||
from scrape_functions import * | ||
|
||
def scrape_webpage(url, file_name, keywords): | ||
|