Garmaine Staff asked 2 years ago
<form class="col-xs-12"> <script type="text/javascript">
var stocks = {"938975":true,"938977":true,"938979":true,"938981":true,"938983":true,"938985":true,"938987":false,"938989":true,"938991":true,"938993":true,"938995":true,"938997":false,"938999":true,"939001":true,"939003":true,"939005":true,"939007":true};

How do I get and loop it, that if there is a "true" value in var stocks for any variable bot goes further but when there is "false" it stops?

For now I'm using something like that, hope you understand:

div = soup.find("form",("class"=="col-xs-12")).find("script",("type"=="text/javascript"

I’m doing bot in python