How to handle "FRAME" fields July 07, 2010 08:09AM |
Registered: 14 years ago Posts: 12 |
Language: HTML<html> <head> <title>UTF TEXT HERE</title> </head> <FRAMESET rows="57px, *" border="0"> [b]<FRAME src="/3537163?fr" frameborder="0" noresize style="overflow:hidden;"> <FRAME src="/goto.aspx" frameborder="0">[/b] </FRAMESET> </html>
Language: Javapublic void run() throws Exception { super.run(); logger.info("Starting download in TASK " + fileURL); GetMethod getMethod = getGetMethod(fileURL); getMethod.setFollowRedirects(true); if (makeRedirectedRequest(getMethod)) { checkNameAndSize(getContentAsString()); Matcher matcher = getMatcherAgainstContent("href=\"(.+?)\">UTF TEXT HERE"); if (matcher.find()) { String web_site_address = "http://fileshare.in.ua"; client.setReferer(web_site_address + fileURL); final String redirectURL = web_site_address + matcher.group(1); getMethod = getGetMethod(redirectURL); if (!makeRedirectedRequest(getMethod)) { throw new ServiceConnectionProblemException(); }
Re: How to handle "FRAME" fields July 07, 2010 03:51PM |
Admin Registered: 15 years ago Posts: 2,094 |
Language: Javapublic void run() throws Exception { super.run(); logger.info("Starting download in TASK " + fileURL); GetMethod getMethod = getGetMethod(fileURL); if (makeRedirectedRequest(getMethod)) { checkProblems(); checkNameAndSize(getContentAsString()); HttpMethod httpMethod = getMethodBuilder().setReferer(fileURL).setBaseURL("http://fileshare.in.ua").setActionFromAHrefWhereATagContains("UTF TEXT HERE").toGetMethod(); if (!makeRedirectedRequest(httpMethod)) { throw new ServiceConnectionProblemException(); } httpMethod = getMethodBuilder().setReferer(httpMethod.getURI().toString()).setBaseURL("http://fileshare.in.ua").setActionFromIframeSrcWhereTagContains("goto.aspx").toGetMethod(); if (!makeRedirectedRequest(httpMethod)) { throw new ServiceConnectionProblemException(); } .....
Re: How to handle "FRAME" fields July 08, 2010 07:44AM |
Registered: 14 years ago Posts: 12 |