import jodd.jerry...;import jodd.lagarto.dom.jerry...Hi there,I'm trying to use Jodd and Jerry in a course project. I downloaded the source file of the Facebook bot example and wanted to see the code. But after I imported the source files and the required .jar library to Eclipse, I still find errors in statements with regard to Jodd and Jerry.The import jodd.lagarto.dom.jerry cannot be resolvedfor import statement such as,import jodd.lagarto.dom.jerry.Jerry;I used the latest Jodd v3.4.0 but in the introduction page, the library is v3.3.1. I'm wondering if this is the problem that causes the errors. If it is, how can I get the earlier version of Jodd?Thanks a lot.Best,Yao
Hi Jodder,Thank you very much for the swift reply.It compiles without error now. But there is error when I tried to run the FBookBot class.Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactoryat jodd.lagarto.LagartoParserEngine.<clinit>(LagartoParserEngine.java:22)at jodd.jerry.Jerry$JerryParser.createLagartoDOMBuilder(Jerry.java:80)at jodd.jerry.Jerry$JerryParser.<init>(Jerry.java:73)at jodd.jerry.Jerry.jerry(Jerry.java:121)at jodd.jerry.Jerry.jerry(Jerry.java:53)at FBookBot.loginToFacebook(FBookBot.java:33)at FBookBot.main(FBookBot.java:19)Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactoryat java.net.URLClassLoader$1.run(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)... 7 moreI've replaced XXX in the following line with a correct Facebook login.private final static String EMAIL = "XXX";private final static String PASS = "XXX";
But there is error starting from this line:Jerry doc = Jerry.jerry(response.getHtml());I understand that this is to create a Jerry object from response.getHtml(), but I have no idea where the error is from. Could you please help me with this problem? Thank you very much!Best,Yao
Hi there,I'm trying to learn Jodd and Jerry by running a much simplier example: the allmusic.com example on Jerry's website. But I ran into the same error with the Facebook example.
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactoryat jodd.lagarto.LagartoParserEngine.<clinit>(LagartoParserEngine.java:22)at jodd.jerry.Jerry$JerryParser.createLagartoDOMBuilder(Jerry.java:80)at jodd.jerry.Jerry$JerryParser.<init>(Jerry.java:73)at jodd.jerry.Jerry.jerry(Jerry.java:121)at jodd.jerry.Jerry.jerry(Jerry.java:53)
at test.main(test.java:20)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactoryat java.net.URLClassLoader$1.run(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 moreCould you please help me re-run this simple example and see if you get the same error? If not, there must be something wrong on my side I have to figure out. Or it might be due to the tweaking codes.Best,
Yao
On Saturday, November 24, 2012 5:47:45 PM UTC-5, jodder wrote:
Sorry for the consecutive messages. My problem is that I simply cannot create Jerry object by, where str is the String containg the html to be parsed.Jerry doc=Jerry.jerry(str);I'm using Eclipse to run the test class.Thank you very much for the help.Best,Yao
On Saturday, November 24, 2012 5:47:45 PM UTC-5, jodder wrote:
Many thanks. I added the logging libraries and it's resolved.One quick question: do you have any idea how I can mimic the action of scrolling down in the Java bot in your example? I'm trying to do something similar but found that the friend list is actually rendered in a AJAX fashion. The fetched page only contains 12 friends. That should be triggered by the scrolling event pageScroll() and then controlled by the corresponding scripts.Thanks again.Best,Yao
Hi there,
Could you please help me take a look at the response? I tried but still don't have any idea of what this is. It's from Firebug's XmtHttpRequest tab. It this XML? If so, how should I handle it? Can you suggest any good tool?I'm sorry but I encounter server error when trying to attach the response. Please kindly find a preview below:
for (;;);{"__ar":1,"payload"....
Also, could you please make this single post with the attachment private? There are quite a few information about me in it.
Best,
Yao
On Thursday, November 29, 2012 1:16:46 PM UTC-5, jodder wrote: