Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scottgriv/python-convert_html_table_to_csv
Scrape a web page table and convert it to a csv file.
https://github.com/scottgriv/python-convert_html_table_to_csv
converter csv csv-file csv-parser html html-table python utility utility-app utility-application utility-script
Last synced: 20 days ago
JSON representation
Scrape a web page table and convert it to a csv file.
- Host: GitHub
- URL: https://github.com/scottgriv/python-convert_html_table_to_csv
- Owner: scottgriv
- License: unlicense
- Created: 2023-05-01T23:00:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T17:57:38.000Z (11 months ago)
- Last Synced: 2024-12-08T16:46:50.334Z (26 days ago)
- Topics: converter, csv, csv-file, csv-parser, html, html-table, python, utility, utility-app, utility-application, utility-script
- Language: HTML
- Homepage:
- Size: 369 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---------------
Convert HTML Table into CSV
Convert a HTML Table into a CSV file using Python.
---------------
## Table of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Resources](#resources)
- [License](#license)
- [Credits](#credits)## Getting Started
### Installation
After installing python and pip, install the below modules in the terminal:
```shell
pip install beautifulsoup4
pip install pandas
```Change your directory to the directory the python script is in and run ``main.py``:
```shell
cd python-convert_html_table_to_csv
python3 main.py
```### Usage
- The `.csv` file will output in the same folder as your script. You can modify the output `.csv` file name or location by updating the ``output_path`` variable in ``main.py``.
- Be sure sure to modify ``main.py`` by changing the ``path`` variable to the website URL or web page you're trying to parse the HTML from.## Resources
- [Python](https://www.python.org/)
- [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
- [Convert HTML Table into CSV file in Python](https://www.geeksforgeeks.org/convert-html-table-into-csv-file-in-python/)**
- [HTML Example Table](https://www.w3schools.com/html/html_tables.asp)**## License
This project is released under the terms of **The Unlicense**, which allows you to use, modify, and distribute the code as you see fit.
- [The Unlicense](https://choosealicense.com/licenses/unlicense/) removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the [LICENSE](LICENSE) file in this repository.## Credits
**Author:** [Scott Grivner](https://github.com/scottgriv)
**Email:** [[email protected]](mailto:[email protected])
**Website:** [scottgrivner.dev](https://www.scottgrivner.dev)
**Reference:** [Main Branch](https://github.com/scottgriv/python-convert_html_table_to_csv)---------------