问题
I'm currently working on a program that checks University class availability but the website uses javascript to display classes and their times. Using Java, I'm working on scraping this data and using it to tell users when classes are open.
I've tried using Selenium but I do not really know how to use it very well. Is there an easier way to do this?
回答1:
Without specific is hard to know. But I assume that if the data is not in the page at load time they may be using AJAX to load it.
As I said I may be assuming too much, but your question is vague, if they use AJAX, check the call they do (and get a json response with a bit of luck) and your work will be extremely easy.
来源:https://stackoverflow.com/questions/16762127/scraping-data-from-website-that-uses-javascript