The parser can perform the following functions:
- Parses PEP number, name and status and saves to .csv file
- Counts the number of all pep documents, sums the number of documents for each category
- Python 3.9.6
- Scrapy 2.5.1
-
Install and activate the virtual environment:
py -m venv venv
. venv/Scripts/activate
-
Install dependencies from requirements.txt:
py -m pip install --upgrade pip
pip install -r requirements.txt
-
Run the spider!:
scrapy crawl pep
The output of the parser in .csv:
"Status","Quantity"
"Accepted","48"
"Active","31"
"April Fool!","1"
"Deferred","37"
"Draft","27"
"Final","269"
"Rejected","121"
"Superseded","20"
"Withdrawn","56"
"Total","610"
Karapetian Zorik
Russian Federation, St. Petersburg, Kupchino.