Skip to content

Instantly share code, notes, and snippets.

@spormeon
Created July 31, 2019 14:14
Show Gist options
  • Select an option

  • Save spormeon/43ea822f1138529194ab84f173d6fdb3 to your computer and use it in GitHub Desktop.

Select an option

Save spormeon/43ea822f1138529194ab84f173d6fdb3 to your computer and use it in GitHub Desktop.
<div class="sponsored-post">
<div class="thumbnail"></div>
<div class="content">
<h1><a href="%%CLICK_URL_UNESC%%%%PATTERN:hb_native_linkurl%%" target="_blank" class="pb-click" pbAdId="%%PATTERN:hb_adid%%">%%PATTERN:hb_native_title%%</a></h1>
<p>%%PATTERN:hb_native_body%%</p>
<div class="attribution">%%PATTERN:hb_native_brand%%</div>
</div>
</div>
<script src="https://adops.adysis.com/prebid_universal_creative_native.js"></script>
<script>
let pbNativeTagData = {};
pbNativeTagData.pubUrl = "%%PATTERN:url%%";
window.pbNativeTag.startTrackers(pbNativeTagData);
</script>
@spormeon
Copy link
Author

/(?:pbjs\.renderAd\(document, |adId: |hb_adid":\[)['"](.*?)["']/g
/(?:pbjs\.renderAd\(document, |adId: |hb_adid":\[)|(?:pbAdId\=)['"](.*?)["']/g

If you replace the first one with the second one it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment