ChangeDotOrgScraper


NameChangeDotOrgScraper JSON
Version 0.0.9 PyPI version JSON
download
home_pageNone
SummaryScrapes online petition data from change.org
upload_time2024-08-04 22:24:39
maintainerNone
docs_urlNone
authorCharles Alba
requires_pythonNone
licenseMIT
keywords change.org petitions web scraping
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            `ChangeDotOrgScraper` is an Python package that allows you to scrape online petition data from [change.org](https://www.change.org/).



[![pypi package](https://img.shields.io/badge/pypi_package-v0.0.9-brightgreen)](https://pypi.org/project/ChangeDotOrgScraper/) [![GitHub Source Code](https://img.shields.io/badge/github_source_code-source_code?logo=github&color=green)](https://github.com/cja5553/change_org_scraper) 







## Installation

To install in python, simply do the following: 

```bash

pip install ChangeDotOrgScraper

```



## Quick Start

Here we provide a quick example on how you can use `ChangeDotOrgScraper` to scrape petition data right from [change.org](https://www.change.org/). 



```python

from ChangeDotOrgScraper import scrape_petitions



# Specify the url of your scrape.org searches

## for instance, we shall scrape petitions from the search "supplemental nutrition assistance program"

url='https://www.change.org/search?q=Supplemental%20Nutrition%20Assistance%20Program&offset=0'



# scrape the petition data from change.org

SNAP_petitions_df=scrape_petitions(url)

print(SNAP_petitions_df)

```

It returns a dataframe with all the petitions data, which contains details such as the petition(s) title, description, date created, target audience signature count, location created, victory status, etc. 







## Requirements

### Required packages

To use `ChangeDotOrgScraper`, you are required to have the following packages installed:  

- `requests`

- `beautifulsoup4`    

- `tqdm`    

- `pandas`  

- `ast` (Python standard library)   

- `re` (Python standard library)   

- `json`  (Python standard library)  



If you do not have these packages installed in python, you can do the following:

```bash

pip install requests beautifulsoup4 tqdm pandas

```





## Citation

This package was made as part of a larger study on food stamps (i.e., SNAP), therefore, we do not have the paper ready just yet. 



However, if you wish to cite, you may cite:



C Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi. 



## Questions?

Contact me at [alba@wustl.edu](mailto:alba@wustl.edu)


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ChangeDotOrgScraper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "change.org, petitions, web scraping",
    "author": "Charles Alba",
    "author_email": "alba@wustl.edu",
    "download_url": "https://files.pythonhosted.org/packages/ed/17/884aed163e89e86c5607487a99065a6436f007a905825b0798edca047718/changedotorgscraper-0.0.9.tar.gz",
    "platform": null,
    "description": "`ChangeDotOrgScraper` is an Python package that allows you to scrape online petition data from [change.org](https://www.change.org/).\r\n\r\n\r\n\r\n[![pypi package](https://img.shields.io/badge/pypi_package-v0.0.9-brightgreen)](https://pypi.org/project/ChangeDotOrgScraper/) [![GitHub Source Code](https://img.shields.io/badge/github_source_code-source_code?logo=github&color=green)](https://github.com/cja5553/change_org_scraper) \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n## Installation\r\n\r\nTo install in python, simply do the following: \r\n\r\n```bash\r\n\r\npip install ChangeDotOrgScraper\r\n\r\n```\r\n\r\n\r\n\r\n## Quick Start\r\n\r\nHere we provide a quick example on how you can use `ChangeDotOrgScraper` to scrape petition data right from [change.org](https://www.change.org/). \r\n\r\n\r\n\r\n```python\r\n\r\nfrom ChangeDotOrgScraper import scrape_petitions\r\n\r\n\r\n\r\n# Specify the url of your scrape.org searches\r\n\r\n## for instance, we shall scrape petitions from the search \"supplemental nutrition assistance program\"\r\n\r\nurl='https://www.change.org/search?q=Supplemental%20Nutrition%20Assistance%20Program&offset=0'\r\n\r\n\r\n\r\n# scrape the petition data from change.org\r\n\r\nSNAP_petitions_df=scrape_petitions(url)\r\n\r\nprint(SNAP_petitions_df)\r\n\r\n```\r\n\r\nIt returns a dataframe with all the petitions data, which contains details such as the petition(s) title, description, date created, target audience signature count, location created, victory status, etc. \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n## Requirements\r\n\r\n### Required packages\r\n\r\nTo use `ChangeDotOrgScraper`, you are required to have the following packages installed:  \r\n\r\n- `requests`\r\n\r\n- `beautifulsoup4`    \r\n\r\n- `tqdm`    \r\n\r\n- `pandas`  \r\n\r\n- `ast` (Python standard library)   \r\n\r\n- `re` (Python standard library)   \r\n\r\n- `json`  (Python standard library)  \r\n\r\n\r\n\r\nIf you do not have these packages installed in python, you can do the following:\r\n\r\n```bash\r\n\r\npip install requests beautifulsoup4 tqdm pandas\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n## Citation\r\n\r\nThis package was made as part of a larger study on food stamps (i.e., SNAP), therefore, we do not have the paper ready just yet. \r\n\r\n\r\n\r\nHowever, if you wish to cite, you may cite:\r\n\r\n\r\n\r\nC Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi. \r\n\r\n\r\n\r\n## Questions?\r\n\r\nContact me at [alba@wustl.edu](mailto:alba@wustl.edu)\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Scrapes online petition data from change.org",
    "version": "0.0.9",
    "project_urls": null,
    "split_keywords": [
        "change.org",
        " petitions",
        " web scraping"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12efd7030c322a1d3087581a48aba797e9716d64ac59fb2f1073b9b881e2c1a3",
                "md5": "2f15fce5717f855204f1984ba21e0ec0",
                "sha256": "62512c0d04c83976cd765cb47e5fd826d88428f04cad8826dae534d07213113f"
            },
            "downloads": -1,
            "filename": "ChangeDotOrgScraper-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2f15fce5717f855204f1984ba21e0ec0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5903,
            "upload_time": "2024-08-04T22:24:37",
            "upload_time_iso_8601": "2024-08-04T22:24:37.230624Z",
            "url": "https://files.pythonhosted.org/packages/12/ef/d7030c322a1d3087581a48aba797e9716d64ac59fb2f1073b9b881e2c1a3/ChangeDotOrgScraper-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed17884aed163e89e86c5607487a99065a6436f007a905825b0798edca047718",
                "md5": "3789b75d06b6207463c3de66c6e03745",
                "sha256": "fbc714d9ae3488f7078f9a6bdab1bab3c7e8c0bb1864b698fae0f21448cc46fe"
            },
            "downloads": -1,
            "filename": "changedotorgscraper-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "3789b75d06b6207463c3de66c6e03745",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5494,
            "upload_time": "2024-08-04T22:24:39",
            "upload_time_iso_8601": "2024-08-04T22:24:39.997257Z",
            "url": "https://files.pythonhosted.org/packages/ed/17/884aed163e89e86c5607487a99065a6436f007a905825b0798edca047718/changedotorgscraper-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 22:24:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "changedotorgscraper"
}
        
Elapsed time: 0.52290s