Java 排除用户代理,以便谷歌抓取我的网站

Java 排除用户代理,以便谷歌抓取我的网站,java,cookies,google-crawlers,Java,Cookies,Google Crawlers,我的网站上有一个脚本(年龄检查cookie脚本) 如果(!$.cookie(“日期”)&&[*id*]!=1){ window.location=“/[~1~]”; } 自1月10日起,谷歌从谷歌索引(站点:mysite.com)中删除了带有脚本的页面 我需要从脚本中排除爬虫。 但是我该怎么做呢 ////// 正如您在此处看到的,页面不再位于索引中: 谷歌似乎能够检测到JS? 有

我的网站上有一个脚本(年龄检查cookie脚本)


如果(!$.cookie(“日期”)&&[*id*]!=1){
window.location=“/[~1~]”;
}                                                        
自1月10日起,谷歌从谷歌索引(站点:mysite.com)中删除了带有脚本的页面

我需要从脚本中排除爬虫。 但是我该怎么做呢

//////

正如您在此处看到的,页面不再位于索引中:

谷歌似乎能够检测到JS? 有关此日期的更多信息:
慢慢地,谷歌正在添加带有年龄检查的页面! 希望对其他人有用

<script>

var botPattern = "(googlebot\/|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.B
ot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|fin
dxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)";
var re = new RegExp(botPattern, 'i');

if(!$.cookie("date") && [*id*] != 1 && !re.test(navigator.userAgent)) {     
    window.location="/[~1~]";
}

</script>

var botPattern=”谷歌(谷歌谷歌谷歌(谷歌谷歌谷歌(谷歌谷歌谷歌机器人)10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10谷歌谷歌谷歌谷歌谷歌(谷歌谷歌谷歌谷歌谷歌谷歌谷歌谷歌谷歌)的中间合作伙伴谷歌(谷歌)谷歌(谷歌)的运营运营商谷歌(谷歌)10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10谷歌谷歌谷歌谷歌谷歌谷歌谷歌谷歌(谷歌谷歌(谷歌)运营运营运营运营运营运营运营运营运营商)谷歌(谷歌(谷歌(谷歌)暴暴暴暴暴暴暴暴暴暴暴暴运营运营运营运营商)运营商)运营运营运营运营运营商(谷歌(谷歌(谷歌)运营商)准准准准准准准准准准准准准准准ver | GingerCrawler | webmon | httrack | WebCrawler | grub.org | Us本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生前,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生后,本次事件发生,本次事件发生后,本次事件发生,本次事件发生,本次事件发生,本次,本次事件发生,本次,本次事件发生,本次事件发生,本次,本次,本次事件发生,本次,本次,本次事件发生,本次,本Xbot | spbot | twengabot | postrank | turnitinbot | scribbot | page2rss | sitebot | linkdex | Adidxbot | blekkobot | ezooms | dotbot | Mail.RU|u Bot | discobot | heritrix | findthatfile | europarchive.org | NerdByNature.B
(12)研究机器人(wbsearchbot)总结:ccbot(12)研究机器人(12)研究机器人(12)总结:ccbot(12)研究机器人(12)总结:ccbot(12)研究机器人(12)研究机器人(12)姐妹姐妹线爬行者(12)研究者们抄录录录录录录录录录录录录录录录波(12)姐妹姐妹线履带式爬行者(12)的城市城市居民们(12)爬行(12)爬行者,对对对城市城市城市城市居民们的爬行(12)爬行者(12)的城市居民们,对对城市城市城市居民们(12)爬行,城市居民们的爬行(12)爬行(12)爬行者,学校学校学校学校学校学校的,对该城市轨道轨道轨道轨道轨道轨道轨道交通(12)爬行者(12)爬行(12)对该方方方方方方方(12)基基会(12)对对对对城市城市城市城市城市城市城市drupact |网络公司爬虫| Aconbot | openindexspider | gnam gnam spider | web archiv中国网络网的网站网站网站的网站网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网络的网络的爬行者的背面的爬行者的网络的网络的背面的背面的网络的网络的爬行者的背面的爬行者的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的网站的爬行者的背面的背面的网络的网络的背面的网络的网络的网络的网络的净葡萄(1)本周的拉拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(2)拉难者(2)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1)拉难者(1;Applebot | TweetmemeBot | crawler4j | fin
dxbot | SemrushBot | yoozBot | lipperhey | y!j-asr |域再动画机器人| AddThis |);
var re=新的RegExp(botPattern,'i');
如果(!$.cookie(“日期”)&&&[*id*]!=1&&!re.test(navigator.userAgent)){
window.location=“/[~1~]”;
}

此网站用于编程问题。SEO是一个离题话题。这是关于我的网站对公众可见的问题。出于兴趣,该脚本的作用是什么?当cookie不存在时,你会被重定向到年龄检查页面。添加年龄时,你会得到一个cookie,可以看到网站的所有页面。javascript禁用了该页面可以访问无重定向。我想我已经找到我的答案。当它工作时,我会发布我的解决方案。
<script>

var botPattern = "(googlebot\/|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.B
ot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|fin
dxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)";
var re = new RegExp(botPattern, 'i');

if(!$.cookie("date") && [*id*] != 1 && !re.test(navigator.userAgent)) {     
    window.location="/[~1~]";
}

</script>