Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Advanced Miner Options :
Low, 4, 10, 1
// Code to enable follow links from match listings page
var elements = document.getElementsByTagName('div');
for(var i=0; i < elements.length; i++)
{
var element = elements[i];
var url = "https://www.flashscore.com/match/" + element.id.replace('g_1_', '');
element.setAttribute("url", url);
}
// RegEx to follow links to load match details page
url="([^"]*)
To open Odds:
-------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='Odds') {
link.click();
break;
}
}
bet365 '1' OPENING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)[^>]*>[^>]*>([^<]*)
bet365 '1' CLOSING
"bet365"[\s\S]*?>([\d]*)(.)([\d][\d])<
bet365 'X' OPENING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)[^>]*>[^>]*>([^<]*)
bet365 'X' CLOSING
"bet365"[\s\S]*?>[\d]*\.[\d][\d]<[\s\S]*?>([\d]*)(.)([\d][\d])<
bet365 '2' OPENING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)[^>]*>[^>]*>([^<]*)
bet365 '2' CLOSING
"bet365"[\s\S]*?>[\d]*\.[\d][\d]<[\s\S]*?>[\d]*\.[\d][\d]<[\s\S]*?>([\d]*)(.)([\d][\d])<
Use the below JS codes and above RegEx strings :
For 1hlf
------------------------------------
var links = document.getElementsByClassName("subTabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText.includes('1st Half')) {
link.click();
break;
}
}
2nd Half
------------------------
var links = document.getElementsByClassName("subTabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText.includes('2nd Half')) {
link.click();
break;
}
}
O/U handicap 0.5 opening and closing odds
-------------------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='O/U') {
link.click();
break;
}
}
OVER OPENING
>0\.5<[^>]*><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
OVER CLOSING
>0\.5<[^>]*><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"[\s\S]*?>([\d]*)(.)([\d][\d])<
UNDER OPENING
>0\.5<[^>]*><a class="[^"]*"\s*href="\/bookmaker\/16\/[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
UNDER CLOSING
>0\.5<[^>]*><a class="[^"]*"\s*href="\/bookmaker\/16\/[\s\S]*?href="\/bookmaker\/15\/[\s\S]*?>([\d]*)(.)([\d][\d])<
Asian handicap (-1.5, -2) opening and closing odds
-------------------------------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='AH') {
link.click();
break;
}
}
"bet365"[\s\S]*?>-1\.5,\s*-2<[\s\S]*?([\d]*)(.)([\d][\d])\s*»
"bet365"[\s\S]*?>-1\.5,\s*-2<[\s\S]*?>([\d]*)(.)([\d][\d])<
JS code to traverse to HT/FT Tab:
-----------------------------------------------------------------------------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='HT/FT') {
link.click();
break;
}
}
Please use the following changed RegEx strings for obtaining open close 1/X 2/X HT-FT for Bet365 :
--------------------------------------------------------------------------------------------------------------------
>1\/X<\/span><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
>1\/X<\/span><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="[^"]*"[\s\S]*?>([\d]*)(.)([\d][\d])<
>2\/X<\/span><a class="[^"]*"\s*ref="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
>2\/X<\/span><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="[^"]*"[\s\S]*?>([\d]*)(.)([\d][\d])<
BTS Odds
---------------------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='BTS') {
link.click();
break;
}
}
BTS YES OPENING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
BTS YES CLOSING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"[\S\s]*?>([\d]*)(.)([\d][\d])<
BTS NO OPENING
href="\/bookmaker\/16\/[\s\S]*?href="\/bookmaker\/16\/[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
BTS NO CLOSING
href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"[\S\s]*?>[\d]*.[\d][\d]<[\s\S]*?href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"[\S\s]*?>([\d]*)(.)([\d][\d])
CS ODDS
---------------------------------------------------
var links = document.getElementsByClassName("tabs__tab");
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
if(link.innerText=='CS') {
link.click();
break;
}
}
Bet365 1:0 Opening:
>1:0<[^>]*><a class="[^"]*"\s*href="\/bookmaker\/16\/[^"]*"\s*target="[^"]*"\s*title="([^(?:"|»)]*)
Bet365 1:0 Closing:
"bet365"[\s\S]*?>1:0<[\s\S]*?>([\d]*)(.)([\d][\d])<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment