{"action":"created","issue":{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/417","repository_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge","labels_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/417/comments","events_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/417/events","html_url":"https://github.com/RSS-Bridge/rss-bridge/issues/417","id":181175040,"number":417,"title":"Creating new bridge for ReadComicOnline.to","user":{"login":"niawag","id":5684014,"avatar_url":"https://avatars.githubusercontent.com/u/5684014?v=3","gravatar_id":"","url":"https://api.github.com/users/niawag","html_url":"https://github.com/niawag","followers_url":"https://api.github.com/users/niawag/followers","following_url":"https://api.github.com/users/niawag/following{/other_user}","gists_url":"https://api.github.com/users/niawag/gists{/gist_id}","starred_url":"https://api.github.com/users/niawag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niawag/subscriptions","organizations_url":"https://api.github.com/users/niawag/orgs","repos_url":"https://api.github.com/users/niawag/repos","events_url":"https://api.github.com/users/niawag/events{/privacy}","received_events_url":"https://api.github.com/users/niawag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/labels/question","name":"question","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T14:43:28Z","updated_at":"2016-10-05T16:08:53Z","closed_at":null,"body":"Hi, I'm trying to create a new bridge and it seems that the site is \"protected\" by javascript, I'd like to know if there is a way to get around this protection. Here is my bridge:\r\n`<?php\r\nclass ReadComicOnlineBridge extends BridgeAbstract{\r\n\r\n\tconst MAINTAINER = \"...\";\r\n\tconst NAME = \"Read Comic Online\";\r\n\tconst URI = \"http://readcomiconline.to/\";\r\n\tconst DESCRIPTION = \"...\";\r\n\r\n    const PARAMETERS = array( array(\r\n        'q'=>array(\r\n            'name'=>'keywords, separated by semicolons',\r\n            'exampleValue'=>'first list;second list;...',\r\n            'required'=>true\r\n        ),\r\n\r\n    ));\r\n\r\n\tpublic function collectData(){\r\n        $keywordsList = explode(\";\",$this->getInput('q'));\r\n        foreach($keywordsList as $keywords){\r\n\t\t\tself::URI.'Comic/'.rawurlencode($keywords)\r\n\t\t\t$html = $this->getSimpleHTMLDOM(self::URI.'Comic/'.rawurlencode($keywords))\r\n\t\t\t\t\t\tor $this->returnServerError('Could not request RCO.');\r\n\r\n            foreach($html->find('tr') as $element) {\r\n                $item = array();\r\n                $item['uri'] = $element->find('a',0)->href;                \r\n                $item['id'] = $item['uri'];\r\n                $item['timestamp'] = $element->find('td',1)->plaintext;\r\n                $item['title'] = $element->find('a',0)->plaintext;\r\n                if(isset($item['title']))\r\n                    $this->items[] = $item;\r\n            }\r\n        }\r\n\t}\r\n}\r\n`\r\nWhen running it I'm getting \"Could not request RCO.\"\r\nI curled the URL and here is the html file:\r\n\r\n`<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <title>Please wait 5 seconds...</title>\r\n<script type=\"text/javascript\">\r\n  //<![CDATA[\r\n  (function(){\r\n    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },\r\n    b = function(b, c) {a() ? document.addEventListener(\"DOMContentLoaded\", b, c) : document.attachEvent(\"onreadystatechange\", b)};\r\n    b(function(){\r\n      var a = document.getElementById('cf-content');a.style.display = 'block';\r\n      setTimeout(function(){\r\n        var s,t,o,p,b,r,e,a,k,i,n,g,f, VmuXJrD={\"DGfiEg\":!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]};\r\n        t = document.createElement('div');\r\n        t.innerHTML=\"<a href='/'>x</a>\";\r\n        t = t.firstChild.href;r = t.match(/https?:\\/\\//)[0];\r\n        t = t.substr(r.length); t = t.substr(0,t.length-1);\r\n        a = document.getElementById('jschl-answer');\r\n        f = document.getElementById('challenge-form');\r\n        ;VmuXJrD.DGfiEg-=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]));VmuXJrD.DGfiEg*=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]));VmuXJrD.DGfiEg-=+((+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]));VmuXJrD.DGfiEg*=!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![];VmuXJrD.DGfiEg+=+((!+[]+!![]+!![]+[])+(+!![]));VmuXJrD.DGfiEg-=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));VmuXJrD.DGfiEg+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]));VmuXJrD.DGfiEg+=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));VmuXJrD.DGfiEg+=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]));a.value = parseInt(VmuXJrD.DGfiEg, 10) + t.length; '; 121'\r\n        f.submit();\r\n      }, 4000);\r\n    }, false);\r\n  })();\r\n  //]]>\r\n</script>\r\n\r\n</head>\r\n<body>\r\n    <div>\r\n        <div style=\"position: relative; height: 130px;\">\r\n            <div style=\"max-width: 635px; margin: 0 auto; z-index: 1000; text-align: center;\r\n                position: relative; margin-top: 150px; width: 100%\">\r\n                <img id=\"imgLogo\" alt=\"jadopado\" style=\"display: inline-block; height: 130px;\" src=\"data:image/gif;charset=binary;base64,R0lGOD...Ds=\"><br />\r\n            </div>\r\n        </div>\r\n        <div>\r\n            <div style=\"text-align: center\">\r\n                Please wait 5 seconds...<br />Make sure to enable cookies and javascript.<br />This site does not work with \"Mini browsers\" (e.g. UC mini, Opera mini...)\r\n            </div>\r\n            <div style=\"margin: 0 auto; visibility: hidden\">\r\n                <div class=\"cf-browser-verification cf-im-under-attack\">\r\n  <noscript><h1 data-translate=\"turn_on_js\" style=\"color:#bd2426;\">Please turn JavaScript on and reload the page.</h1></noscript>\r\n  <div id=\"cf-content\" style=\"display:none\">\r\n    <div>\r\n      <div class=\"bubbles\"></div>\r\n      <div class=\"bubbles\"></div>\r\n      <div class=\"bubbles\"></div>\r\n    </div>\r\n    <h1><span data-translate=\"checking_browser\">Checking your browser before accessing</span> readcomiconline.to.</h1>\r\n    <p data-translate=\"process_is_automatic\">This process is automatic. Your browser will redirect to your requested content shortly.</p>\r\n    <p data-translate=\"allow_5_secs\">Please allow up to 5 seconds&hellip;</p>\r\n  </div>\r\n  <form id=\"challenge-form\" action=\"/cdn-cgi/l/chk_jschl\" method=\"get\">\r\n    <input type=\"hidden\" name=\"jschl_vc\" value=\"f7c7ccc03db2734dd1c26a2f145ff9cb\"/>\r\n    <input type=\"hidden\" name=\"pass\" value=\"1475677872.263-+p8Sjkz6+g\"/>\r\n    <input type=\"hidden\" id=\"jschl-answer\" name=\"jschl_answer\"/>\r\n  </form>\r\n</div>\r\n\r\n            </div>\r\n        </div>\r\n        <div style=\"padding: 20px;\">\r\n        </div>\r\n    </div>\r\n</body>\r\n</html>\r\n`\r\nAs you can guess, this is not what I'd like to grab. Is there a way to bypass this protection ?"},"comment":{"url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/comments/251720846","html_url":"https://github.com/RSS-Bridge/rss-bridge/issues/417#issuecomment-251720846","issue_url":"https://api.github.com/repos/RSS-Bridge/rss-bridge/issues/417","id":251720846,"user":{"login":"LogMANOriginal","id":5776685,"avatar_url":"https://avatars.githubusercontent.com/u/5776685?v=3","gravatar_id":"","url":"https://api.github.com/users/LogMANOriginal","html_url":"https://github.com/LogMANOriginal","followers_url":"https://api.github.com/users/LogMANOriginal/followers","following_url":"https://api.github.com/users/LogMANOriginal/following{/other_user}","gists_url":"https://api.github.com/users/LogMANOriginal/gists{/gist_id}","starred_url":"https://api.github.com/users/LogMANOriginal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogMANOriginal/subscriptions","organizations_url":"https://api.github.com/users/LogMANOriginal/orgs","repos_url":"https://api.github.com/users/LogMANOriginal/repos","events_url":"https://api.github.com/users/LogMANOriginal/events{/privacy}","received_events_url":"https://api.github.com/users/LogMANOriginal/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T16:08:53Z","updated_at":"2016-10-05T16:08:53Z","body":"I'm pretty sure it is possible, though I don't have time to try it myself right now. The site actually checks for certain cookies that determine if you can directly enter the site or have to go through the \"protection\" page. When I removed one of the cookies it would load indefinitely (probably because it is missing some info). Removing all cookies puts me back to the JavaScript page.\r\n\r\nCheck out the cookies:\r\n\r\n![cookies](https://cloud.githubusercontent.com/assets/5776685/19121211/e870db64-8b25-11e6-8652-bfbb24f94d19.png)\r\n\r\nAccording to [this](http://stackoverflow.com/questions/19775530/add-custom-cookie-in-php-curl) you can specify custom cookies in curl, however cookies do have a lifespan, so if the cookie must be renewed in a very short amount of time you are probably out of luck."}}
{"actor":{"display_login":"LogMANOriginal"}}