changedotorgscraper 0.0.6__tar.gz → 0.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -119,13 +119,13 @@ def clean_info(petition_info, creator_info):
119
119
 
120
120
  Returns
121
121
  list_of_petitions (list): a list of dictionaries, with each dictionary containing information about the petition and creator from the list of petitions within one webpage.
122
- These includes petition title, Description, target audience, signature count, creator name, date created, location createdd, and victory status.
122
+ These includes petition title, Description, signature count, creator name, date created, location createdd, and victory status.
123
123
  '''
124
124
  list_of_petitions=[]
125
125
  for i,j in zip(petition_info,creator_info):
126
126
  petition_title=i["petition"]["ask"]
127
127
  petition_description=i["petition"]["description"]
128
- petition_target=i["petition"]["targetingDescription"]
128
+ # petition_target=i["petition"]["targetingDescription"]
129
129
  petition_signatures=i["petition"]["signatureState"]["signatureCount"]["displayed"]
130
130
  petition_creator=j["user"]["displayName"]
131
131
  date_created=j['createdAt']
@@ -133,7 +133,7 @@ def clean_info(petition_info, creator_info):
133
133
  victory_verification_status=j['isVerifiedVictory']
134
134
  curr={"Petition title":petition_title,
135
135
  "Description":petition_description,
136
- "target":petition_target,
136
+ # "target":petition_target,
137
137
  "signature count":petition_signatures,
138
138
  "creator":petition_creator,
139
139
  "date created":date_created,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChangeDotOrgScraper
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Scrapes online petition data from change.org
5
5
  Author: Charles Alba
6
6
  Author-email: alba@wustl.edu
@@ -19,10 +19,19 @@ Requires-Dist: requests
19
19
  Requires-Dist: bs4
20
20
  Requires-Dist: tqdm
21
21
  Requires-Dist: pandas
22
+ Requires-Dist: beautifulsoup4
22
23
 
23
- Scrapes online petition data from [change.org](https://www.change.org/).
24
-
24
+ `ChangeDotOrgScraper` is an Python package that allows you to scrape online petition data from [change.org](https://www.change.org/).
25
+
25
26
 
26
27
 
27
- [![pypi package](https://img.shields.io/badge/pypi_package-v0.0.6-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)
28
-
28
+ [![pypi package](https://img.shields.io/badge/pypi_package-v0.0.8-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)
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+ ## Installation
37
+
38
+ To install in python, simply do the following:
39
+
40
+ ```bash
41
+
42
+ pip install ChangeDotOrgScraper
43
+
44
+ ```
45
+
29
46
 
30
47
 
31
48
  ## Quick Start
32
49
 
33
50
  Here we provide a quick example on how you can use `ChangeDotOrgScraper` to scrape petition data right from [change.org](https://www.change.org/).
34
51
 
@@ -46,7 +55,7 @@ It returns a dataframe with all the petitions data, which contains details such
46
55
  ### Required packages
47
56
 
48
57
  To use `ChangeDotOrgScraper`, you are required to have the following packages installed:
49
58
 
50
59
  - `requests`
51
60
 
52
- - `bs4`
53
-
61
+ - `beautifulsoup4`
62
+
54
63
  - `tqdm`
55
64
 
56
65
  - `pandas`
57
66
 
58
67
  - `ast` (Python standard library)
59
68
 
@@ -55,14 +64,9 @@ To use `ChangeDotOrgScraper`, you are required to have the following packages in
55
64
 
56
65
 
57
66
  If you do not have these packages installed in python, you can do the following:
58
67
 
59
68
  ```bash
60
69
 
61
- pip install requests bs4 tqdm pandas
62
-
70
+ pip install requests beautifulsoup4 tqdm pandas
71
+
63
72
  ```
64
73
 
65
74
 
66
75
 
67
- ## Installation
68
-
69
- To install in python, simply do the following:
70
-
71
- ```bash
72
-
73
- pip install ChangeDotOrgScraper
74
-
75
- ```
76
-
77
76
 
78
77
 
79
78
  ## Citation
80
79
 
81
80
  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.
82
81
 
@@ -72,4 +76,4 @@ However, if you wish to cite, you may cite:
72
76
  C Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi.
73
77
 
74
78
 
75
79
 
76
80
  ## Questions?
77
81
 
78
- Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
82
+ Contact me at [alba@wusl.edu](mailto:alba@wustl.edu)
83
+
@@ -2,3 +2,4 @@ requests
2
2
  bs4
3
3
  tqdm
4
4
  pandas
5
+ beautifulsoup4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChangeDotOrgScraper
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Scrapes online petition data from change.org
5
5
  Author: Charles Alba
6
6
  Author-email: alba@wustl.edu
@@ -19,10 +19,19 @@ Requires-Dist: requests
19
19
  Requires-Dist: bs4
20
20
  Requires-Dist: tqdm
21
21
  Requires-Dist: pandas
22
+ Requires-Dist: beautifulsoup4
22
23
 
23
- Scrapes online petition data from [change.org](https://www.change.org/).
24
-
24
+ `ChangeDotOrgScraper` is an Python package that allows you to scrape online petition data from [change.org](https://www.change.org/).
25
+
25
26
 
26
27
 
27
- [![pypi package](https://img.shields.io/badge/pypi_package-v0.0.6-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)
28
-
28
+ [![pypi package](https://img.shields.io/badge/pypi_package-v0.0.8-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)
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+ ## Installation
37
+
38
+ To install in python, simply do the following:
39
+
40
+ ```bash
41
+
42
+ pip install ChangeDotOrgScraper
43
+
44
+ ```
45
+
29
46
 
30
47
 
31
48
  ## Quick Start
32
49
 
33
50
  Here we provide a quick example on how you can use `ChangeDotOrgScraper` to scrape petition data right from [change.org](https://www.change.org/).
34
51
 
@@ -46,7 +55,7 @@ It returns a dataframe with all the petitions data, which contains details such
46
55
  ### Required packages
47
56
 
48
57
  To use `ChangeDotOrgScraper`, you are required to have the following packages installed:
49
58
 
50
59
  - `requests`
51
60
 
52
- - `bs4`
53
-
61
+ - `beautifulsoup4`
62
+
54
63
  - `tqdm`
55
64
 
56
65
  - `pandas`
57
66
 
58
67
  - `ast` (Python standard library)
59
68
 
@@ -55,14 +64,9 @@ To use `ChangeDotOrgScraper`, you are required to have the following packages in
55
64
 
56
65
 
57
66
  If you do not have these packages installed in python, you can do the following:
58
67
 
59
68
  ```bash
60
69
 
61
- pip install requests bs4 tqdm pandas
62
-
70
+ pip install requests beautifulsoup4 tqdm pandas
71
+
63
72
  ```
64
73
 
65
74
 
66
75
 
67
- ## Installation
68
-
69
- To install in python, simply do the following:
70
-
71
- ```bash
72
-
73
- pip install ChangeDotOrgScraper
74
-
75
- ```
76
-
77
76
 
78
77
 
79
78
  ## Citation
80
79
 
81
80
  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.
82
81
 
@@ -72,4 +76,4 @@ However, if you wish to cite, you may cite:
72
76
  C Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi.
73
77
 
74
78
 
75
79
 
76
80
  ## Questions?
77
81
 
78
- Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
82
+ Contact me at [alba@wusl.edu](mailto:alba@wustl.edu)
83
+
@@ -7,7 +7,7 @@ readme_path = os.path.join(here, "README.md")
7
7
  with codecs.open(readme_path, encoding="utf-8") as fh:
8
8
  long_description = fh.read()
9
9
 
10
- VERSION = '0.0.6'
10
+ VERSION = '0.0.8'
11
11
  DESCRIPTION = 'Scrapes online petition data from change.org'
12
12
  LONG_DESCRIPTION = 'A package that scrapes online petition data from change.org, including the title, description, target audience, signature count, creator name, date created, location created, and victory status. Works by simply providing the url of the change.org petition search.'
13
13
 
@@ -21,7 +21,7 @@ setup(
21
21
  long_description_content_type="text/markdown",
22
22
  long_description=long_description,
23
23
  packages=find_packages(),
24
- install_requires=['requests', 'bs4', 'tqdm', 'pandas'],
24
+ install_requires=['requests', 'bs4', 'tqdm', 'pandas','beautifulsoup4'],
25
25
  license='MIT',
26
26
  keywords=['change.org', 'petitions', 'web scraping'],
27
27
  classifiers=[