Compare commits

...

3 Commits

Author SHA1 Message Date
f9774c568d Обновил readme 2024-04-28 01:35:37 +03:00
65d7c642bf Update docker settings 2023-03-17 15:51:55 +03:00
52684a0b7c Small encoding fix 2023-03-17 00:39:29 +03:00
4 changed files with 11 additions and 10 deletions

View File

@ -1,18 +1,17 @@
FROM python:3.11.1-alpine3.17
FROM python:3.11.2-alpine3.17
LABEL Maintainer="serega404"
WORKDIR /app
COPY ./requirements.txt requirements.txt
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
# Setting up crontab
COPY crontab /tmp/crontab
RUN cat /tmp/crontab > /etc/crontabs/root
COPY main.py main.py
RUN /usr/bin/crontab /etc/cron.d/crontab
# run crond as main process of container
CMD ["/usr/sbin/crond", "-f"]
CMD ["crond", "-f", "-l", "2"]

View File

@ -1,6 +1,6 @@
# MetricAliexpressExchangeRate
[![MIT License](https://img.shields.io/github/license/serega404/EasyESPRealy)](https://github.com/serega404/MetricAliexpressExchangeRate)
[![MIT License](https://img.shields.io/github/license/serega404/MetricAliexpressExchangeRate)](https://github.com/serega404/MetricAliexpressExchangeRate/blob/main/LICENSE)
Экспортер курса Aliexpress и ЦБ РФ
@ -35,6 +35,7 @@ docker run -d --name MetricAliexpressExchangeRate \
### Библиотеки
* [Requests](https://requests.readthedocs.io/en/latest/)
* [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/)
### Лицензия

View File

@ -1 +1,2 @@
*/10 * * * * python3 /app/main.py >> /tmp/out.log
@reboot cd /app && python3 /app/main.py
*/10 * * * * cd /app && python3 /app/main.py

View File

@ -18,7 +18,7 @@ if (site.status_code != 200):
print("Ali request error: " + str(site.status_code))
exit()
soup = BeautifulSoup(site.text, "html.parser")
soup = BeautifulSoup(site.content, "html.parser")
tmpstring = " "*20
for tag in soup.find_all("div"):