问题
I am using HtmlUnit to scrap date from a site but after login all the data is displayed using adobe flash player as swf object, I don't know any way to scrap data from such page.
Is there any way to extract data from flash page, If yes please help me out, either using HtmlUnit or any other java tool.
thanks.
回答1:
There is no way that you can interact with Flash applet using HtmlUnit. You can try with selenium; I never used it, but it looks like there are plugins that enable flash communication like flash selenium
Personally, I think the only way to test user interfaces, when they have such pitfalls, is to hire a tester human being (a good one), and teach the developers to deeply test the gui every time they alter it.
回答2:
Seems am not too late, there i answered to my question. what all you need to do is
- Create your own browser instant
- Inject "stockwave flash" plugin
- Instantiate htmlunit with new browser instance.
Hope it will help you.
来源:https://stackoverflow.com/questions/14876147/scraping-flash-using-htmlunit-or-other-java-tool