Skip to content

Tag: python

How Do You Add A Replay Button To A Game?

Im trying to make a replay button for my game where when you die the game pauses until you press the space bar which resets the game so you can play again. I’m using python with pygame. If you can fix this, please do! It would make my day. If possible, please include the code for the fix and where

Scraping stock price data

I’m trying to get the prices from this URL. Can someone tell me what I’m doing wrong? https://stockcharts.com/h-hd/?%24GSPCE Answer Stockcharts only provides historical data to StockChart members, so you probably need to pass some kind of authentication. Or use an api like this one

How to get the value of an element within a tag?

I want to get the values of data-account and data-id which are elements within play-js tag. elemname = driver.find_elements_by_xpath(‘xpath…/div/play-js’) I tried like below, but I couldn’t get the value. With javascript, I was able to import it with the code below. How can I get the v…