Python-Scripts
Python-Scripts copied to clipboard
Added Custom-search CLI script
PR Title
Custom-search CLI script (#460)
Summary
Implemented a Python script that uses Google Custom Search API to perform queries and export results to CSV.
Description
This script implements a Google Custom Search scraper with the following features:
- Load API setting from
setting.json(create the file if missing and allows adding the api key with--add_api_key) - Uses Google Custom Search API to fetch search result (
--search_queryor-sq) - Support pagination with
--pagecommand - Export the search results(title and link) in
output.csvfile
The changes are as follows:
- Added
scraper.py(main python script) - Added
setting.jsonto fetch API key - Added
output.csvfor saving results - Created CLI interface with
argparsesupporting options for search query, pagination and API key management
Checks
in the repository
- [x] Made no changes that degrades the functioning of the repository
- [x] Gave each commit a better title (unlike updated README.md)
in the PR
- [x] Followed the format of the pull_request_template
- [ ] Made the Pull Request in a small level (for the creator's wellfare)
- [ ] Tested the changes you made
Thank You,
Javad-dd