This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var css = "position: fixed;width: 230px;right: 0;top: 50px;z-index: 999999999999;background: #fff;border: 1px solid #222;font-size: 15px;padding: 10px;"; | |
| $('body').append('<div style="'+ css +'">'+/\"keywords\"\s*:"(.*?)"/g.exec($('#player-api').next().next()[0].innerHTML)[1]+'</div>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| casper.then(function() { | |
| this.click('div.table-main table:nth-child(1) tbody tr:nth-child(1) td.team-home'); | |
| this.waitForPopup(/match/, function(){ | |
| console.log('popup opened') | |
| }); | |
| this.withPopup(/match/, function(){ | |
| this.capture('popup.png') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var out = {} | |
| var externalObject = {} | |
| var idofSection = $('.submenu-container .ifmenu .selected').attr('id') | |
| idofSection = idofSection.split('-') | |
| idofSection = idofSection[idofSection.length - 1] | |
| externalObject = [] | |
| $('#table-type-1 tbody tr').each(function(index){ | |
| var obj = {} | |
| var id = index + 1 | |
| obj['rank'] = $('#table-type-1 tbody tr:nth-child('+ id +') td.rank').text() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var yesterdayDataLoaded = false; | |
| var lengthOfTables; | |
| var yesterdayData; | |
| var matches = []; | |
| var fs = require('fs') | |
| var casper = require('casper').create(); | |
| casper.start('http://www.myscore.com.ua/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var url = "http://www.oddsportal.com/matches/soccer/" | |
| var page = require('webpage').create(); | |
| page.onResourceReceived = function(response) { | |
| if(response.url.substring(0, 24) == "http://fb.oddsportal.com"){ | |
| console.log('Receive ' + response.body); | |
| } | |
| }; | |
| page.open(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toSeconds(time_str) { | |
| // Extract hours, minutes and seconds | |
| var parts = time_str.split(':'); | |
| // compute and return total seconds | |
| return parts[0] * 3600 + // an hour has 3600 seconds | |
| parts[1] * 60 + // a minute has 60 seconds | |
| + | |
| parts[2]; // seconds | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var casper = require('casper').create({ | |
| pageSettings: { | |
| loadImages: false, | |
| loadPlugins: false, | |
| userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22' | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var casper = require('casper').create(); | |
| casper.options.onResourceRequested = function(C, requestData, request) { | |
| if ((/https?:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') { | |
| console.log('Skipping CSS file: ' + requestData['url']); | |
| request.abort(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var casper = require('casper').create(); | |
| var colorizer = require('colorizer').create('Colorizer'); | |
| casper.start('http://findmyfbid.com/'); | |
| casper.then(function() { | |
| var url = casper.evaluate(function(url) { | |
| $('.input-lg').val(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var jpn = [ | |
| 'あa','いi','うu','えe','おo', | |
| 'かka','きki','くku','けke','こko', | |
| 'さsa','しshi','すsu','せse','そso', | |
| 'たta','ちchi','つtsu','てte','とto', | |
| 'なna','にni','ぬnu','ねne','のno', | |
| 'はha','ひhi','ふfu','へhe','ほho', | |
| 'まma','みmi','むmu','めme','もmo', | |
| 'やya','ゆyu','よyo', | |
| 'らra','りri','るru','れre','ろro', |