feat: initial commit
This commit is contained in:
parent
ee6018894e
commit
b25f04d218
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# Ignore Python bytecode files
|
||||
*.pyc
|
||||
*.pyo
|
||||
__pycache__/
|
||||
|
||||
# Ignore virtual environment directories
|
||||
.venv/
|
||||
venv/
|
||||
env/
|
||||
|
||||
# Ignore system files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Ignore log files
|
||||
*.log
|
||||
|
||||
# Ignore temporary files
|
||||
*.tmp
|
||||
*.swp
|
||||
|
||||
# Ignore output files
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
|
||||
# Ignore environment files
|
||||
.env
|
||||
|
||||
# IDE files
|
||||
.idea/
|
||||
.vscode/
|
13
app/main.py
Normal file
13
app/main.py
Normal file
@ -0,0 +1,13 @@
|
||||
from scraper import scraper
|
||||
import time
|
||||
|
||||
|
||||
def main():
|
||||
print("Starting the application...\n\n")
|
||||
scraper()
|
||||
print("\n\nApplication finished!")
|
||||
time.sleep(8)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
8
app/requirements.txt
Normal file
8
app/requirements.txt
Normal file
@ -0,0 +1,8 @@
|
||||
beautifulsoup4==4.12.3
|
||||
bs4==0.0.2
|
||||
certifi==2024.8.30
|
||||
charset-normalizer==3.4.0
|
||||
idna==3.10
|
||||
requests==2.32.3
|
||||
soupsieve==2.6
|
||||
urllib3==2.2.3
|
17
app/scraper.py
Normal file
17
app/scraper.py
Normal file
@ -0,0 +1,17 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
def scraper():
|
||||
directory = "dist"
|
||||
file_path = os.path.join(directory, "data.json")
|
||||
|
||||
data = []
|
||||
|
||||
try:
|
||||
os.mkdir("dist")
|
||||
except FileExistsError:
|
||||
pass
|
||||
with open(file_path, "w", encoding="utf-8") as file:
|
||||
json.dump(data, file)
|
||||
print("Data has been scraped!")
|
Loading…
Reference in New Issue
Block a user