Python Forum

Full Version: Outputing the results of search machine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

is it possible to make a programme that takes as arguments, a key word i.e q=help and the start and finish pages of the results of a search machine i.e page=0 to page=3(4 result pages) and output these result pages to 4 different html files?
Sounds like a scraper. See this tutorial Web scraping with Scrapy
Yes, that is possible.

For command line programs, check out sys.argv.
For web-based programs, you'll need to find out how your framework handles "url parameters". Most of them just use keyword arguments passed to the function assigned to the url path.
(Nov-07-2016, 04:42 PM)nilamo Wrote: [ -> ]For command line programs, check out sys.argv.
the argparse module is better than using sys.argv
https://docs.python.org/3/library/argparse.html
That's neat. I didn't know that was added.