deividgdt / ytadsblocker

YTadsblocker is a script to block all the Youtube's advertisement in Pi-Hole
GNU General Public License v3.0
89 stars 12 forks source link

Script not reading or not founding googlevideo domains #12

Closed ftonioli closed 2 years ago

ftonioli commented 2 years ago

Hello,

I have the same issue that #7 now.

If I uninstall, then install, scripts is able to read log file and add domains.

After start, no more domains are added, even they are showed on QueryLog.

I did some tests but could not figure out whats is going on.

I´m using PiHole + Unbound

Can you help-me ?

Query Log: 2021-08-28 20:09:56 AAAA r6---sn-25ge7ns7.googlevideo.com 192.168.x.x OK (forwarded to localhost#5335) INSECURE CNAME (486.2ms) 2021-08-28 20:09:56 A r6---sn-25ge7ns7.googlevideo.com 192.168.x.x OK (forwarded to localhost#5335) INSECURE CNAME (147.2ms)

Manually running:

pi@piaware:/var/log $ export YT_DOMAINS=$(cat /var/log/pihole.log | egrep --only-matching "r([0-9]{1,2})[^-].*.googlevideo.com" | sort | uniq)

pi@piaware:/var/log $ echo $YT_DOMAINS r1.sn-apn7en7e.googlevideo.com r1.sn-apn7en7l.googlevideo.com r2.sn-25ge7nzs.googlevideo.com r2.sn-5hneknee.googlevideo.com r2.sn-apn7en7e.googlevideo.com r2.sn-apn7en7l.googlevideo.com r3.sn-5hnekn7z.googlevideo.com r3.sn-8vq54vox2u-apnl.googlevideo.com r3.sn-apn7en7e.googlevideo.com r3.sn-apn7en7l.googlevideo.com r3.sn-h5q7knez.googlevideo.com r3.sn-hpa7kn76.googlevideo.com r4.sn-25ge7nsd.googlevideo.com r4.sn-apn7en7e.googlevideo.com r4.sn-apn7en7l.googlevideo.com r5.sn-apn7en7e.googlevideo.com r5.sn-apn7en7l.googlevideo.com r6.sn-25ge7ns7.googlevideo.com

pi@piaware:/var/log $

LOG: Aug 28 20:09:55 dnsmasq[816]: query[A] r1---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:09:55 dnsmasq[816]: forwarded r1---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:09:55 dnsmasq[816]: reply r1---sn-apn7en7l.googlevideo.com is Aug 28 20:09:55 dnsmasq[816]: reply r1.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:09:55 dnsmasq[816]: query[AAAA] r1---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:09:55 dnsmasq[816]: forwarded r1---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:09:55 dnsmasq[816]: reply r1---sn-apn7en7l.googlevideo.com is Aug 28 20:09:55 dnsmasq[816]: reply r1.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:09:56 dnsmasq[816]: query[A] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:09:56 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:09:56 dnsmasq[816]: query[AAAA] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:09:56 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:09:56 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:09:56 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:09:56 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:09:56 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:09:56 dnsmasq[816]: query[A] r6---sn-25ge7ns7.googlevideo.com from 192.168.x.x Aug 28 20:09:56 dnsmasq[816]: forwarded r6---sn-25ge7ns7.googlevideo.com to 127.0.0.1 Aug 28 20:09:56 dnsmasq[816]: query[AAAA] r6---sn-25ge7ns7.googlevideo.com from 192.168.x.x Aug 28 20:09:56 dnsmasq[816]: forwarded r6---sn-25ge7ns7.googlevideo.com to 127.0.0.1 Aug 28 20:09:56 dnsmasq[816]: reply r6---sn-25ge7ns7.googlevideo.com is Aug 28 20:09:56 dnsmasq[816]: reply r6.sn-25ge7ns7.googlevideo.com is 209.85.230.252 Aug 28 20:09:56 dnsmasq[816]: reply r6---sn-25ge7ns7.googlevideo.com is Aug 28 20:09:56 dnsmasq[816]: reply r6.sn-25ge7ns7.googlevideo.com is 2a00:1450:4007:6::c Aug 28 20:10:05 dnsmasq[816]: query[A] r3---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:05 dnsmasq[816]: forwarded r3---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:05 dnsmasq[816]: query[AAAA] r3---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:05 dnsmasq[816]: forwarded r3---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:05 dnsmasq[816]: reply r3---sn-apn7en7l.googlevideo.com is Aug 28 20:10:05 dnsmasq[816]: reply r3.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:06 dnsmasq[816]: reply r3---sn-apn7en7l.googlevideo.com is Aug 28 20:10:06 dnsmasq[816]: reply r3.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:06 dnsmasq[816]: query[A] r4---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:06 dnsmasq[816]: forwarded r4---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:06 dnsmasq[816]: query[AAAA] r4---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:06 dnsmasq[816]: forwarded r4---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:06 dnsmasq[816]: reply r4---sn-apn7en7l.googlevideo.com is Aug 28 20:10:06 dnsmasq[816]: reply r4.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:06 dnsmasq[816]: reply r4---sn-apn7en7l.googlevideo.com is Aug 28 20:10:06 dnsmasq[816]: reply r4.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:06 dnsmasq[816]: query[A] r4---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:06 dnsmasq[816]: forwarded r4---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:06 dnsmasq[816]: query[AAAA] r4---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:06 dnsmasq[816]: forwarded r4---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:06 dnsmasq[816]: reply r4---sn-apn7en7e.googlevideo.com is Aug 28 20:10:06 dnsmasq[816]: reply r4.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:06 dnsmasq[816]: reply r4---sn-apn7en7e.googlevideo.com is Aug 28 20:10:06 dnsmasq[816]: reply r4.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:16 dnsmasq[816]: query[A] r4---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:16 dnsmasq[816]: forwarded r4---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:16 dnsmasq[816]: query[AAAA] r4---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:16 dnsmasq[816]: forwarded r4---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:16 dnsmasq[816]: reply r4---sn-apn7en7e.googlevideo.com is Aug 28 20:10:16 dnsmasq[816]: reply r4.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:16 dnsmasq[816]: reply r4---sn-apn7en7e.googlevideo.com is Aug 28 20:10:16 dnsmasq[816]: reply r4.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:23 dnsmasq[816]: query[A] r1---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:23 dnsmasq[816]: forwarded r1---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:23 dnsmasq[816]: reply r1---sn-apn7en7l.googlevideo.com is Aug 28 20:10:23 dnsmasq[816]: reply r1.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:23 dnsmasq[816]: query[AAAA] r1---sn-apn7en7l.googlevideo.com from 192.168.x.x Aug 28 20:10:23 dnsmasq[816]: forwarded r1---sn-apn7en7l.googlevideo.com to 127.0.0.1 Aug 28 20:10:23 dnsmasq[816]: reply r1---sn-apn7en7l.googlevideo.com is Aug 28 20:10:23 dnsmasq[816]: reply r1.sn-apn7en7l.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:23 dnsmasq[816]: query[A] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:23 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:23 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:10:23 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:23 dnsmasq[816]: query[AAAA] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:23 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:23 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:10:23 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:33 dnsmasq[816]: query[A] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:33 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:33 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:10:33 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection Aug 28 20:10:33 dnsmasq[816]: query[AAAA] r1---sn-apn7en7e.googlevideo.com from 192.168.x.x Aug 28 20:10:33 dnsmasq[816]: forwarded r1---sn-apn7en7e.googlevideo.com to 127.0.0.1 Aug 28 20:10:33 dnsmasq[816]: reply r1---sn-apn7en7e.googlevideo.com is Aug 28 20:10:33 dnsmasq[816]: reply r1.sn-apn7en7e.googlevideo.com is blocked during CNAME inspection

ytadsblocker LOG

[2021-08-28 19:49:51] Checking /var/log/pihole.log... [2021-08-28 19:49:54] No new subdomains to added. [2021-08-28 19:54:54] Checking /var/log/pihole.log... [2021-08-28 19:54:58] No new subdomains to added. [2021-08-28 19:59:58] Checking /var/log/pihole.log... [2021-08-28 20:00:01] No new subdomains to added. [2021-08-28 20:05:01] Checking /var/log/pihole.log... [2021-08-28 20:05:05] No new subdomains to added. [2021-08-28 20:10:05] Checking /var/log/pihole.log... [2021-08-28 20:10:08] No new subdomains to added. [2021-08-28 20:15:08] Checking /var/log/pihole.log... [2021-08-28 20:15:12] No new subdomains to added.

ftonioli commented 2 years ago

Any help ?

deividgdt commented 2 years ago

Hi @ftonioli

Sorry, I've been really busy these days. I'll take a look to this, and I'll be with you with more information.

Kind regards

ftonioli commented 2 years ago

Tks David,

By now, I uninstalled, and I'm using Regex without problem.

But no problem to install again if you need.


Felipe Tonioli

A sexta, 10/09/2021, 13:22, David @.***> escreveu:

Hi @ftonioli https://github.com/ftonioli

Sorry, I've been really busy these days. I'll take a look to this, and I'll be with you with more information.

Kind regards

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deividgdt/ytadsblocker/issues/12#issuecomment-916863923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7EMNKY24UV4PUCHKB22BTUBHZ7DANCNFSM5DCBIZOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

deividgdt commented 2 years ago

Hi @ftonioli

I've found the issue. It has been fixed in the PR #13

Kind regards

ftonioli commented 2 years ago

Hello,

Will install and back to you soon!!


Felipe Tonioli

On Fri, Sep 10, 2021 at 3:34 PM David @.***> wrote:

Reopened #12 https://github.com/deividgdt/ytadsblocker/issues/12.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deividgdt/ytadsblocker/issues/12#event-5284859867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7EMNJGMSGUB7BP3KDRJXDUBIJQ7ANCNFSM5DCBIZOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ftonioli commented 2 years ago

David,

Installation ran fine, log was ready and domains added.

/opt/ytadsblocker $ tail -f /var/log/ytadsblocker.log [2021-09-10 15:43:04] Adding the subdomain: r5.sn-5hnekn7d.googlevideo.com [2021-09-10 15:43:04] Adding the subdomain: r5.sn-h5q7dned.googlevideo.com [2021-09-10 15:43:04] Adding the subdomain: r5.sn-h5q7kne6.googlevideo.com [2021-09-10 15:43:04] Adding the subdomain: r5.sn-h5q7kned.googlevideo.com [2021-09-10 15:43:04] Adding the subdomain: r5.sn-h5q7knel.googlevideo.com [2021-09-10 15:43:04] Adding the subdomain: r5.sn-h5qzen7d.googlevideo.com [2021-09-10 15:49:34] Youtube Ads Blocker has been installed. Welcome! [2021-09-10 15:49:53] Youtube Ads Blocker Started [2021-09-10 15:49:53] Checking /var/log/pihole.log... [2021-09-10 15:49:54] No new subdomains to added. [2021-09-10 15:54:54] Checking /var/log/pihole.log... [2021-09-10 15:54:54] New subdomain to add: r2.sn-8vq54vox2u-apnl.googlevideo.com [2021-09-10 15:54:54] New subdomain to add: r4.sn-apn7en7e.googlevideo.com [2021-09-10 15:54:54] Updating database... [2021-09-10 15:54:54] All the new subdomains added.

Looks like it is working.

Will continue to monitor and back to you.


Felipe Tonioli

On Fri, Sep 10, 2021 at 3:37 PM Felipe Tonioli @.***> wrote:

Hello,

Will install and back to you soon!!


Felipe Tonioli

On Fri, Sep 10, 2021 at 3:34 PM David @.***> wrote:

Reopened #12 https://github.com/deividgdt/ytadsblocker/issues/12.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deividgdt/ytadsblocker/issues/12#event-5284859867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7EMNJGMSGUB7BP3KDRJXDUBIJQ7ANCNFSM5DCBIZOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ftonioli commented 2 years ago

Hello Davi,

Looks like everything is working fine again.

Thank you for your help.

deividgdt commented 2 years ago

Hi @ftonioli

Superb! So I'm closing this issue!