From a2cc6a539168f0f75f4ebf2df4f5e7a95d3ca929 Mon Sep 17 00:00:00 2001 From: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:15:29 -0600 Subject: [PATCH 1/2] Update req.txt --- req.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/req.txt b/req.txt index b9a31de..c43db50 100644 --- a/req.txt +++ b/req.txt @@ -1,4 +1,6 @@ bs4 requests datetime -time \ No newline at end of file +time +pandas +openpyxl From a8fe660b939ce605526f4d12843eb9459cca856f Mon Sep 17 00:00:00 2001 From: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:15:36 -0600 Subject: [PATCH 2/2] Tiny clean up --- README.md | 2 ++ config.py | 2 +- main.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e2ae1e..e214d86 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,10 @@ Get the price from LCSC.com for some items πŸπŸ•ΈοΈ The LCSC-Python-WebScraper is a program that allows you to get the prices of items from LCSC.com. By using web scraping techniques with Python, you can easily gather the information you need for your purchasing decisions. With this program, you can save time and effort by avoiding the need to manually search for prices. + ## Requirements - Python3 + ## Installation ```pip install -r req.txt``` diff --git a/config.py b/config.py index 6450b05..264be96 100644 --- a/config.py +++ b/config.py @@ -1,2 +1,2 @@ fileLocation = "output/" -delayBetweenPriceCheck = 120 \ No newline at end of file +delayBetweenPriceCheck = 120 diff --git a/main.py b/main.py index bb77f55..a724263 100644 --- a/main.py +++ b/main.py @@ -51,4 +51,5 @@ def autoscrapper(): lcscscraper(i["url"], i["span"], i["fronttext"]) time.sleep(config.delayBetweenPriceCheck) -autoscrapper() +if __name__ == '__main__': + autoscrapper()