Skip to content

Commit

Permalink
Use urllib.parse.quote to encode quote characters
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-gillard committed Jul 9, 2024
1 parent f5171a1 commit 549273e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions edgar_tool/main.py → edgar_tool/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import fire


def main_entrypoint():
def main():
fire.Fire(SecEdgarScraperCli)


if __name__ == "__main__":
main_entrypoint()
main()
2 changes: 1 addition & 1 deletion edgar_tool/text_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _generate_request_args(

# Generate request arguments
request_args = {
"q": keywords,
"q": urllib.parse.quote(keywords),
"dateRange": "custom",
"startdt": start_date.strftime("%Y-%m-%d"),
"enddt": end_date.strftime("%Y-%m-%d"),
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ keywords=["scraper", "edgar", "finance", "sec"]
"Bug Tracker" = "https://github.com/bellingcat/EDGAR/issues"

[tool.poetry.scripts]
edgar-tool = "edgar_tool.main:main_entrypoint"
edgar-tool = "edgar_tool.__main__:main"

[tool.poetry.dependencies]
python = "^3.9"
Expand All @@ -36,4 +36,4 @@ black = "^24.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry.core.masonry.api"

0 comments on commit 549273e

Please sign in to comment.