changedotorgscraper 0.0.6__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.
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper/ChangeDotOrgScraper.py +3 -3
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/PKG-INFO +12 -10
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/requires.txt +1 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/PKG-INFO +12 -10
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/setup.py +2 -2
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper/__init__.py +0 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/SOURCES.txt +0 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/dependency_links.txt +0 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/top_level.txt +0 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/LICENSE +0 -0
- {changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/setup.cfg +0 -0
{changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper/ChangeDotOrgScraper.py
RENAMED
|
@@ -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,
|
|
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
|
-
|
|
136
|
+
# "target":petition_target,
|
|
137
137
|
"signature count":petition_signatures,
|
|
138
138
|
"creator":petition_creator,
|
|
139
139
|
"date created":date_created,
|
{changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ChangeDotOrgScraper
|
|
3
|
-
Version: 0.0.
|
|
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
|
-
|
|
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
|
-
[](https://pypi.org/project/ChangeDotOrgScraper/) [](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,7 +47,7 @@ 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
|
-
- `
|
|
53
|
-
|
|
53
|
+
- `beautifulsoup4`
|
|
54
|
+
|
|
54
55
|
- `tqdm`
|
|
55
56
|
|
|
56
57
|
- `pandas`
|
|
57
58
|
|
|
58
59
|
- `ast` (Python standard library)
|
|
59
60
|
|
|
@@ -55,7 +56,7 @@ To use `ChangeDotOrgScraper`, you are required to have the following packages in
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
If you do not have these packages installed in python, you can do the following:
|
|
58
59
|
|
|
59
60
|
```bash
|
|
60
61
|
|
|
61
|
-
pip install requests
|
|
62
|
-
|
|
62
|
+
pip install requests beautifulsoup4 tqdm pandas
|
|
63
|
+
|
|
63
64
|
```
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
## Installation
|
|
68
69
|
|
|
@@ -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
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ChangeDotOrgScraper
|
|
3
|
-
Version: 0.0.
|
|
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
|
-
|
|
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
|
-
[](https://pypi.org/project/ChangeDotOrgScraper/) [](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,7 +47,7 @@ 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
|
-
- `
|
|
53
|
-
|
|
53
|
+
- `beautifulsoup4`
|
|
54
|
+
|
|
54
55
|
- `tqdm`
|
|
55
56
|
|
|
56
57
|
- `pandas`
|
|
57
58
|
|
|
58
59
|
- `ast` (Python standard library)
|
|
59
60
|
|
|
@@ -55,7 +56,7 @@ To use `ChangeDotOrgScraper`, you are required to have the following packages in
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
If you do not have these packages installed in python, you can do the following:
|
|
58
59
|
|
|
59
60
|
```bash
|
|
60
61
|
|
|
61
|
-
pip install requests
|
|
62
|
-
|
|
62
|
+
pip install requests beautifulsoup4 tqdm pandas
|
|
63
|
+
|
|
63
64
|
```
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
## Installation
|
|
68
69
|
|
|
@@ -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.
|
|
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=[
|
|
File without changes
|
{changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{changedotorgscraper-0.0.6 → changedotorgscraper-0.0.7}/ChangeDotOrgScraper.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|