# EzScraper
This is a Python package that converts HTML tables to CSV files. It provides a simple and efficient way to extract data from tables and store it in CSV format.
## Installation
You can install the package using pip:
```
pip install EzScraper
```
## Usage
The package provides a table_to_csv class that you can use to extract tables from HTML pages and convert them to CSV files. Here's an example:
```python
from EzScraper import table_to_csv
url = "https://www.worldometers.info/coronavirus/"
crawle = table_to_csv(url=url, file_name="my_table")
crawle.extract_tables()
```
This will extract all tables from the specified URL and save each one as a separate CSV file in the current working directory. You can also specify the index of the table you want to extract using the index parameter:
```python
table_to_csv(url, all=False, index=2, file_name='my_table')
```
This will extract the third table from the specified URL and save it as a CSV file with the name "my_table.csv" in the current working directory.
You can also use the file_name parameter to specify the name of the CSV file. If you don't specify a name, the package will generate a unique name based on the current date and time.
```python
table_to_csv(url, all=True, index=False, file_name='my_data')
```
This will extract all tables from the specified URL and save them as CSV files with names like "my_data.csv", "my_data_1.csv", "my_data_2.csv", etc.
## Contributing
If you want to contribute to the package, please fork the repository, make your changes, and submit a pull request. Please include tests for any new features or bug fixes you add.
Raw data
{
"_id": null,
"home_page": "",
"name": "EzScraper",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,Scraping,csv,Scraping Data,to csv file",
"author": "Issam Haidaoui (issamoxix)",
"author_email": "<issamhaidaoui@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a1/ea/8c9c9d84e2d28d634364cd42b234b2c7233bf34223dc2c98fa8faf76d848/EzScraper-1.2.tar.gz",
"platform": null,
"description": "\n# EzScraper\n\nThis is a Python package that converts HTML tables to CSV files. It provides a simple and efficient way to extract data from tables and store it in CSV format.\n\n\n## Installation\n\nYou can install the package using pip:\n\n```\npip install EzScraper\n```\n\n## Usage\n\nThe package provides a table_to_csv class that you can use to extract tables from HTML pages and convert them to CSV files. Here's an example:\n\n\n```python\nfrom EzScraper import table_to_csv\n\nurl = \"https://www.worldometers.info/coronavirus/\"\ncrawle = table_to_csv(url=url, file_name=\"my_table\")\ncrawle.extract_tables()\n```\n\nThis will extract all tables from the specified URL and save each one as a separate CSV file in the current working directory. You can also specify the index of the table you want to extract using the index parameter:\n```python\ntable_to_csv(url, all=False, index=2, file_name='my_table')\n```\nThis will extract the third table from the specified URL and save it as a CSV file with the name \"my_table.csv\" in the current working directory.\n\n\nYou can also use the file_name parameter to specify the name of the CSV file. If you don't specify a name, the package will generate a unique name based on the current date and time.\n\n```python \ntable_to_csv(url, all=True, index=False, file_name='my_data')\n```\n\nThis will extract all tables from the specified URL and save them as CSV files with names like \"my_data.csv\", \"my_data_1.csv\", \"my_data_2.csv\", etc.\n\n## Contributing\n\nIf you want to contribute to the package, please fork the repository, make your changes, and submit a pull request. Please include tests for any new features or bug fixes you add.\n",
"bugtrack_url": null,
"license": "",
"summary": "Scraping HTML Tables from websites to csv file",
"version": "1.2",
"split_keywords": [
"python",
"scraping",
"csv",
"scraping data",
"to csv file"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a9f2960b6b37a8389a3ba1df0a34dc5ec2c85019c229c4f7c11efe69bf7cd7cc",
"md5": "ed26aa8a523a704d620039e54c8a7984",
"sha256": "bac16a2d392960fd4621ba87f5a15314a09aa43195e36f75aa17e2e5373ab74c"
},
"downloads": -1,
"filename": "EzScraper-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ed26aa8a523a704d620039e54c8a7984",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3128,
"upload_time": "2023-03-19T22:49:37",
"upload_time_iso_8601": "2023-03-19T22:49:37.688105Z",
"url": "https://files.pythonhosted.org/packages/a9/f2/960b6b37a8389a3ba1df0a34dc5ec2c85019c229c4f7c11efe69bf7cd7cc/EzScraper-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a1ea8c9c9d84e2d28d634364cd42b234b2c7233bf34223dc2c98fa8faf76d848",
"md5": "eed72cab30bbd6d1f1abd15005c92c59",
"sha256": "7835c45582714c703e5ce019a114703f10c678722e93e53ee569c52ce7b5b70d"
},
"downloads": -1,
"filename": "EzScraper-1.2.tar.gz",
"has_sig": false,
"md5_digest": "eed72cab30bbd6d1f1abd15005c92c59",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3027,
"upload_time": "2023-03-19T22:49:39",
"upload_time_iso_8601": "2023-03-19T22:49:39.184807Z",
"url": "https://files.pythonhosted.org/packages/a1/ea/8c9c9d84e2d28d634364cd42b234b2c7233bf34223dc2c98fa8faf76d848/EzScraper-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-19 22:49:39",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "ezscraper"
}