I am looking to scrape a list of stocks from a Yahoo screener. I was wondering if anyone knows how to get the list without having to go from page to page.
It is a post to:
https://query1.finance.yahoo.com/v1...S&formatted=true&corsDomain=finance.yahoo.com
With the following post data:
{"offset":0,"size":25,"sortType":"DESC","sortField":"eodvolume","quoteType":"EQUITY","query":{"operator":"and","operands":[{"operator":"or","operands":[{"operator":"EQ","operands":["region","us"]},{"operator":"EQ","operands":["region","ca"]}]},{"operator":"gt","operands":["percentchange",3]},{"operator":"lt","operands":["lastclose52weeklow.lasttwelvemonths",10]}]},"userId":"","userIdType":"guid"}
It returns json with the data for all 540 names.
You may have to obtain a cookie and include it in your request header. How to do that is covered in a previous thread about yahoo api problems. You should be able to find that thread easily using the ET search facillity.