Skip to content

Instantly share code, notes, and snippets.

@sysnucleus
sysnucleus / gist:9eecdc7be7f9a67da0c79a4ddaf9f5ef
Created October 27, 2026 05:33
FlashScore H2H Scraping Codes - WebHarvy
//----------------------------------------------
// Click Home-H2H tab
//----------------------------------------------
document.querySelector('.h2hSection').children[0].children[1].click();
//----------------------------------------------
// Remove H2H section if matches less than 5
//----------------------------------------------
@sysnucleus
sysnucleus / gist:f1599b266ff83a6a2003f5203a989573
Created September 9, 2026 04:00
Flashscore codes for scraping opening and closing odds (home, draw, away) | WebHarvy
//bet365 — Home opening odds:
alt="bet365"[\s\S]*?ODDS_COMPARISONS_ODD_CELL_1"[\s\S]*?(?:title="(?<opening>[\d.]+)\s*\u00BB\s*[\d.]+"[\s\S]*?<span[^>]*>[\d.]+</span>|title=""[\s\S]*?<span[^>]*>(?<opening>[\d.]+)</span>)
//bet365 — Draw opening odds:
alt="bet365"[\s\S]*?ODDS_COMPARISONS_ODD_CELL_2"[\s\S]*?(?:title="(?<opening>[\d.]+)\s*\u00BB\s*[\d.]+"[\s\S]*?<span[^>]*>[\d.]+</span>|title=""[\s\S]*?<span[^>]*>(?<opening>[\d.]+)</span>)
// bet365 — Away opening odds:
@sysnucleus
sysnucleus / gist:9d3a045c3de22af8a3041683bd948312
Created September 4, 2026 06:45
WebHarvy Codes for Scraping Opening and Closing Odds at OddsPortal
<OddsPortal Codes for WebHarvy/>
//-------------------------------------------------------------------------------
// Closing Odds (1, X, 2)
// For Bet365, change bookmaker name as required, for example: Pinnacle[^\d]*(.*)
//--------------------------------------------------------------------------------
bet365[^\d-]*(.*)
bet365[^\d-]*.*\s*(.*)
@sysnucleus
sysnucleus / gist:363fe03571b1ca0ac423d6b063ad899b
Created September 3, 2026 09:29
webharvy code to delete authors without emails at chemarxiv.org
els = document.getElementsByClassName('core-authors')[0];
for (var i = els.children.length - 1; i >= 0; i--) {
el = els.children[i];
if(!el.innerHTML.includes('mailto')) {
el.parentElement.removeChild(el);
}
}
@sysnucleus
sysnucleus / gist:c6e8e8fc5cdd2774500d934ddbd9b9d9
Created September 2, 2026 10:58
pubs.acs.org - filter authors with emails - webharvy
els = document.getElementsByClassName('al-author-name');
for (var i = els.length - 1; i >= 0; i--) {
if(!els[i].innerHTML.includes('*')) {
els[i].parentElement.removeChild(els[i]);
}
}
// RegEx for Author Name
name="citation_author" content="([^"]*)"><meta data-vue-meta="1" name="citation_author_email"
// RegEx for Email
name="citation_author" content="[^"]*"><meta data-vue-meta="1" name="citation_author_email" content="([^"]*)
(function () {
extracting = false;
FIXED = 'data-link-fixed';
document.addEventListener('click', function (e) {
if (extracting) return;
if (e.target.closest(`a[${FIXED}]`)) {
e.stopPropagation();
return;
// Select Match ID
data-event-id="([^"]*)
// Retain only highlighted rows
Standings - Overall
--------------------
Yellow card[\s\S]*?<span[^>]*>([^<]*)
Red card[\s\S]*?<span[^>]*>([^<]*)
Substitution[\s\S]*?<span[^>]*>([^<]*)
>Goal[\s\S]*?<span[\s\S]*?<span[^>]*>([^<]*)
>Own goal[\s\S]*?<span[\s\S]*?<span[^>]*>([^<]*)
@sysnucleus
sysnucleus / gist:9949f7104e574574b4bf21b4060f31b6
Created December 30, 2025 11:23
WebHarvy RegEx codes for mdpi.com | corresponding author name and email
Corresponding Author Name
--------------------------
scholar\?q=([^"]*)[^>]*>[^>]*>[^>]*>[^>]*>[^>]*>[\d\s\,]*\*
Email
------
\*<\/sup>[^>]*>[^>]*><a class="[^"]*" data-author-id="\d+" href="mailto:([^"]*)