Python-Scripts icon indicating copy to clipboard operation
Python-Scripts copied to clipboard

Added Custom-search CLI script

Open Java-dd opened this issue 2 months ago • 0 comments

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_query or -sq)
  • Support pagination with --page command
  • Export the search results(title and link) in output.csv file

The changes are as follows:

  • Added scraper.py (main python script)
  • Added setting.json to fetch API key
  • Added output.csv for saving results
  • Created CLI interface with argparse supporting 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

Java-dd avatar Sep 22 '25 13:09 Java-dd