DisableAMP icon indicating copy to clipboard operation
DisableAMP copied to clipboard

Remove AMP from cdn.ampproject.org

Open smfukaya opened this issue 3 years ago • 7 comments

Script is unable to remove AMP from cdn.ampproject.org URLs returned by Google Discovery, even if you open them in a browser.

https://veja-abril-com-br.cdn.ampproject.org/v/s/veja.abril.com.br/coluna/veja-gente/o-prejuizo-causado-pelo-laser-no-show-de-alok-no-rock-in-rio/amp/?amp_gsa=1&amp_js_v=a9&usqp=mq331AQIKAGwASCAAgM%3D#amp_tf=De%20%251%24s&aoh=16625447277825&csi=1&referrer=https%3A%2F%2Fwww.google.com&ampshare=https%3A%2F%2Fveja.abril.com.br%2Fcoluna%2Fveja-gente%2Fo-prejuizo-causado-pelo-laser-no-show-de-alok-no-rock-in-rio%2F

Should be:

https://veja.abril.com.br/coluna/veja-gente/o-prejuizo-causado-pelo-laser-no-show-de-alok-no-rock-in-rio/

smfukaya avatar Sep 07 '22 11:09 smfukaya

@smfukaya, hi! Thanks for the feedback, could you, please, also provide link to the source page you being redirected from?

stanislav-atr avatar Sep 07 '22 14:09 stanislav-atr

Hi Stanilsav, I'm not sure if I understood it correctly, but I clicked on a Google Discovery (that app that is displayed when you swipe all the way to the left in Android devices) feed. Unfortunately, I believe the feed was tailored to my preferences and moreover that app doesn't show me the URL nor access to its HTML source (perhaps I could get it using some kind of Web proxy sniffer). If you were not referring to this kind of source page, please let me know. Best!

smfukaya avatar Sep 07 '22 15:09 smfukaya

@smfukaya, thanks for clarification, i wasn't able to find any amp URLs on available devices, though.

The link above is being stripped of amp for me on desktop(mind the 30s timeout). Is this still reproducible for you? (you could try to clear cache and cookies for site in question).

stanislav-atr avatar Sep 08 '22 09:09 stanislav-atr

Hi Stanislav, You're right! I installed the "https://userscripts.adtidy.org/release/disable-amp/1.0/disable-amp.user.js" script in my desktop Firefox ViolentMonkey and it did stripped amp from the URL.

Do not know why it does not work with Google Discovery (Google News) app ... perhaps it is the same problem that makes impossible to block YouTube ads. Anyway, using Telerik Fiddler, NoxPlayer, I emulated the app navigation.

The request goes something like

GET https://play.google.com/newsstand/api/v3/people/me/read-now?next=Gi9DQnhpSHdvV2RUb3dNelUwTURNNE5EUXpOams0TURVMU5UYzVOQkNwcEw3NnNUQSACKsQBQ2dvS0FqRTVFZ1F0TFY0dENnY0tBakUzRWdFd0Nna0tBVGdTQkMwdFhpMEtDUW9CT1JJRUxTMWVMUW9LQ2dJeE9CSUVMUzFlTFFvZkNnRXpFaHBEWjFsTFFWUkJVMEZVVlV0RFVXOURXREU0VTBGNlFUWk9VUW9LQ2dJeE1CSUVMUzFlTFFvaENnRXlFaHhEWjJOTFFWUkZVMEZxUlhwRFoyOUxRV3c1WmtWblVYaFBha1Y2Q2dvS0FqRTFFZ1F0TFY0dDAAOh9nM3BSTzNKald3Z2JrSG5vTXJGMXo2YmF0Z0QxTVJn&hl=en-US&country=BR&physicalCountry=BR&clientVersion=5.61.0.466946674&os=Android&ceid=BR%3Apt-419&sceids=US%3Aen&v=0 HTTP/1.1
Host: play.google.com
Connection: keep-alive
X-Dots-Device: **SUPPRESSED**
X-Dots-Device-Tag:  **SUPPRESSED**
X-Dots-TimeZoneOffsetMinutes: -180
X-Dots-Device-ID:  **SUPPRESSED**
X-Dots-Device-Build:  **SUPPRESSED**
X-Dots-User-Data-Consistency-Token: **SUPPRESSED**
X-Dots-Network-Type: 4
User-Agent: NS/5.61.0.466946674 (Linux; U; Android 5.1.1; en-us; small_tablet/SM-G988N Build/NMF26X; Density/160; gzip) com.google.android.apps.magazines/2022089220
X-Dots-ClientFeatureFlags: ALLOW_SECTION_HEADER_FROM_FEED,AMP_LITE,COMPRESSED_HEADERS,ENABLE_TRANSLATE,FAST_HEADLINES_ONBOARDING,GARAMOND_ONBOARDING_V2,GARAMOND_RUNDOWN_CAROUSEL_SUBHEADER,GEMINI_FAST_HEADLINES_ONBOARDING,HEADER_BUTTON,IMAGE_SPECIAL_HEADER,IN_APP_UPDATE,LOCAL_V2,MOMENTS,MOMENTS_V2,N2,PANDEMIC_MAP_FEED,RICH_TWEETS,ROUND_ROBIN_TOURNAMENT_HEADER,SIGNED_OUT_NOTIFICATIONS,SPORTS_FULL_COVERAGE,STORY_360_ALL_COVERAGE,STORY_360_SHARING,STORY_PANELS,STORY_PANELS_V2,STORY_UPDATES_ON_FEED,SWG_PAYWALL_WEB_PAGE_SUMMARIES,WHEEL_TOURNAMENT_HEADER,WINNER_PROBABILITY_CARD
X-AndroidId: **SUPPRESSED**
X-Dots-Upgrade-Version: 2
Accept-Language: en-US
Authorization:  **SUPPRESSED**
Accept-Encoding: gzip, deflate

And you can find the response in the attached ZIP file.

RawFile.zip

Hope it helps. Best!

smfukaya avatar Sep 08 '22 23:09 smfukaya

@smfukaya, does url stripping works if you open link in your mobile browser? Disable AMP won't be able to modify url on Google Discovery's in-app browser.

stanislav-atr avatar Sep 09 '22 09:09 stanislav-atr

Hi Stanislav, It only works if I also install the script in tampermonkey in a mobile browser that supports that addon like Kiwi browser. Opening an Amp URL with mobile Google Chrome even with the script enabled in Adguard does not strip it.

smfukaya avatar Sep 10 '22 14:09 smfukaya

@smfukaya, I still havn't had success in reproducing this issue on my devices. Could you, please, try to reset your AG app settings, reinstall DisableAMP script and reinstall AG, in that order?

stanislav-atr avatar Sep 13 '22 16:09 stanislav-atr