- Parsing product categories
- Importing retrieved information into csv or xlsx
-
Clone the repository
git clone https://github.com/devShev/onliner-parser.git
-
Select the desired category in your browser
-
Copy the URL from your browser's address bar
-
Go to the app.py file and paste your URL, you get the following code
url = 'your url'
parser = CatalogParser(url)
parser.parse()
saver = SaveManager(Product, parser.get_data())
saver.save()
Setup complete
- Gather information from directory
- Return received information in the form of a list of objects
Saves the obtained information into a file
- filename - the name of the file to be created (optional parameter, by default - 'products')
- save_format - the file format (csv / xlsx) (optional parameter, by default - csv)
Sets the name of directory where files are saved (default - 'data/')
- name - the directory name (required parameter)