-
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.
Merge branch 'main' of https://github.com/lryanle/SMARE
- Loading branch information
Showing
19 changed files
with
1,044 additions
and
274 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 |
---|---|---|
|
@@ -130,4 +130,7 @@ dist | |
.pnp.* | ||
|
||
# misc | ||
*.DS_STORE | ||
*.DS_STORE | ||
|
||
# python | ||
*.pyc |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
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,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
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,25 @@ | ||
FROM public.ecr.aws/lambda/python@sha256:f0c3116a56d167eba8021a5d7c595f969835fbe78826303326f80de00d044733 as build | ||
RUN yum install -y unzip-* && \ | ||
curl -Lo "/tmp/chromedriver-linux64.zip" "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip" && \ | ||
curl -Lo "/tmp/chrome-linux64.zip" "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chrome-linux64.zip" && \ | ||
unzip /tmp/chromedriver-linux64.zip -d /opt/ && \ | ||
unzip /tmp/chrome-linux64.zip -d /opt/ && \ | ||
yum clean all | ||
|
||
FROM public.ecr.aws/lambda/python@sha256:f0c3116a56d167eba8021a5d7c595f969835fbe78826303326f80de00d044733 | ||
RUN yum install atk-* cups-libs-* gtk3-* libXcomposite-* alsa-lib-* \ | ||
libXcursor-* libXdamage-* libXext-* libXi-* libXrandr-* libXScrnSaver-* \ | ||
libXtst-* pango-* at-spi2-atk-* libXt-* xorg-x11-server-Xvfb-* \ | ||
xorg-x11-xauth-* dbus-glib-* dbus-glib-devel-* -y && \ | ||
yum clean all | ||
COPY --from=build /opt/chrome-linux64 /opt/chrome | ||
COPY --from=build /opt/chromedriver-linux64 /opt/ | ||
|
||
WORKDIR /var/task | ||
COPY scrapers.py ./ | ||
COPY src ./src | ||
COPY requirements.txt ./ | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
CMD [ "scrapers.craigslist" ] |
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 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[scripts] | ||
build = "docker build --platform linux/amd64 -t smare ." | ||
cont = "docker run --name smarecontainer -d smare:latest" | ||
exec = "docker exec -it smarecontainer" | ||
craigslist = "pipenv run exec python3 -c 'import scrapers; scrapers.craigslist(\"\",\"\")'" | ||
facebook = "pipenv run exec python3 -c 'import scrapers; scrapers.facebook(\"\",\"\")'" | ||
|
||
[packages] | ||
selenium = "*" | ||
bs4 = "*" | ||
pymongo = "*" | ||
typer = "*" | ||
python-dotenv = "*" | ||
|
||
[dev-packages] | ||
isort = "*" | ||
black = "*" | ||
flake8 = "*" | ||
|
||
[requires] | ||
python_version = "3.11" |
Oops, something went wrong.
cf2acd7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
seniordesign – ./
smare.vercel.app
seniordesign-git-main-lryanle.vercel.app
seniordesign-lryanle.vercel.app
smare.lryanle.com