how to get the next page when I don't understand the next button format

22 views
Skip to first unread message

Robert Cheetham

unread,
Mar 18, 2023, 11:22:26 PM3/18/23
to beautifulsoup
Hi,

I'm trying to scrape all the stock symbols for the US stock exchange (they change every day by 10-50 items) so I have found a site that lists the current symbols ((https://stockanalysis.com/stocks/) and it list the first 500, to get the next 500 it has a button (Next) which has the html as:

<button class="controls-btn xs:pl-1 xs:pr-1.5 bp:text-sm sm:pl-3 sm:pr-1"><span class="hidden sm:inline">Next</span> <svg class="-mb-px h-5 w-5 text-gray-600 bp:ml-1" viewBox="0 0 20 20" fill="currentColor" style="max-width:40px" aria-hidden="true"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg></button>

I have no idea how to send a command to the web server to stimulate this. Can anybody help?

thanks Robert

Jim Tittsler

unread,
Mar 19, 2023, 5:03:45 AM3/19/23
to beauti...@googlegroups.com
Rather than treating it as a web page, you may want to parse the data
variable embedded in that page.
Reply all
Reply to author
Forward
0 new messages