I am trying to get the transcription info from some Khan Academy videos using scrapy. For example: https://www.khanacademy.org/math/algebra-basics/basic-alg-foundations/alg-basics-negative-numbers/v/opposite-of-a-number
When I Tried to select the Transcript button through xpath response.xpath('//div[contains(@role, "tablist")]/a').extract()
I only got the information about the tab has the aria-selected="true"
which is the About section. I would need to use scrapy to change the aria-selected
from false to true in the Transcript button and then retrieve the necessary information.
Could anyone please clarify how I would be able to accomplish this?
Much appreciated !