Skip to content

Commit

Permalink
Match API change of HYS
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrech committed Sep 19, 2023
1 parent 2f58677 commit f9c6a9e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
venv/
dist/
src/hys_scraper.egg-info/
src/hys_scraper.egg-info/

project_notes.txt
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "hys_scraper"
version = "0.1.32"
version = "0.1.33"
description = "Scrape feedback and statistics from the European Commission's 'Have your Say' plattform."
readme = "README.md"
classifiers = [
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile pyproject.toml
#
Expand Down
4 changes: 2 additions & 2 deletions src/hys_scraper/hys_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def scrape_publication_name(self) -> str:
"""
url = (
self.base_url
+ f"brpapi/shortTitleByPublicationId?publicationId={self.publication_id}"
+ f"api/shortTitleByPublicationId?publicationId={self.publication_id}"
)

r = self._get(url)
Expand Down Expand Up @@ -148,7 +148,7 @@ def _scrape_page(self, page: int = 0, size: int = None) -> dict:
dict
Parsed JSON return value.
"""
url = self.base_url + f"brpapi/allFeedback?publicationId={self.publication_id}"
url = self.base_url + f"api/allFeedback?publicationId={self.publication_id}"
url += f"&page={page}"
url += f"&size={size}" if size is not None else ""

Expand Down

0 comments on commit f9c6a9e

Please sign in to comment.