changedotorgscraper 0.0.5__tar.gz → 0.0.7__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.5
3
+ Version: 0.0.7
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,11 @@ 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.5-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.7-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
+
29
30
 
30
31
 
31
32
  ## Quick Start
32
33
 
33
34
  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
35
 
@@ -46,16 +47,16 @@ It returns a dataframe with all the petitions data, which contains details such
46
47
  ### Required packages
47
48
 
48
49
  To use `ChangeDotOrgScraper`, you are required to have the following packages installed:
49
50
 
50
51
  - `requests`
51
52
 
52
- - `bs4`
53
-
53
+ - `beautifulsoup4`
54
+
54
55
  - `tqdm`
55
56
 
56
57
  - `pandas`
57
58
 
58
- - `ast`
59
-
59
+ - `ast` (Python standard library)
60
+
60
61
  - `re` (Python standard library)
61
62
 
62
63
  - `json` (Python standard library)
63
64
 
64
65
 
65
66
 
66
67
  If you do not have these packages installed in python, you can do the following:
67
68
 
68
69
  ```bash
69
70
 
70
- pip install requests bs4 tqdm pandas ast
71
-
71
+ pip install requests beautifulsoup4 tqdm pandas
72
+
72
73
  ```
73
74
 
74
75
 
75
76
 
76
77
  ## Installation
77
78
 
@@ -72,4 +73,4 @@ However, if you wish to cite, you may cite:
72
73
  C Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi.
73
74
 
74
75
 
75
76
 
76
77
  ## Questions?
77
78
 
78
- Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
79
+ Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
80
+
@@ -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.5
3
+ Version: 0.0.7
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,11 @@ 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.5-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.7-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
+
29
30
 
30
31
 
31
32
  ## Quick Start
32
33
 
33
34
  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
35
 
@@ -46,16 +47,16 @@ It returns a dataframe with all the petitions data, which contains details such
46
47
  ### Required packages
47
48
 
48
49
  To use `ChangeDotOrgScraper`, you are required to have the following packages installed:
49
50
 
50
51
  - `requests`
51
52
 
52
- - `bs4`
53
-
53
+ - `beautifulsoup4`
54
+
54
55
  - `tqdm`
55
56
 
56
57
  - `pandas`
57
58
 
58
- - `ast`
59
-
59
+ - `ast` (Python standard library)
60
+
60
61
  - `re` (Python standard library)
61
62
 
62
63
  - `json` (Python standard library)
63
64
 
64
65
 
65
66
 
66
67
  If you do not have these packages installed in python, you can do the following:
67
68
 
68
69
  ```bash
69
70
 
70
- pip install requests bs4 tqdm pandas ast
71
-
71
+ pip install requests beautifulsoup4 tqdm pandas
72
+
72
73
  ```
73
74
 
74
75
 
75
76
 
76
77
  ## Installation
77
78
 
@@ -72,4 +73,4 @@ However, if you wish to cite, you may cite:
72
73
  C Alba (2024) `ChangeDotOrgScraper`: A python package to scrape petition data from change.org. PyPi.
73
74
 
74
75
 
75
76
 
76
77
  ## Questions?
77
78
 
78
- Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
79
+ Contact me at [alba@wusl.edu](mailto:alba@wusl.edu)
80
+
@@ -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.5'
10
+ VERSION = '0.0.7'
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=[