-
AuthorPosts
-
February 20, 2023 at 4:43 pm #12552Zach SchmitParticipant
Hi,
We are using the following shortcode to display the Google news RSS feed in the Pro plugin version 4.7.1.
[srr_feed urls="https://news.google.com/rss/search?q=self-esteem&hl=en-US&gl=US&ceid=US:en" tab_titles="Android" color_style="twitter" filter_type="hide" filter_name="exclude_this" show_author=1 show_date=1 display_type=grid template="%%thumbnail%% %%metadata%% <h3>%%title%%</h3> %%description%%" grid_columns=4 show_author=0 thumbnail_position=cover read_more="Read More" count=20 thumbnail_size="200px" thumbnail_force="when_absent"]
Unfortunately, it has stopped fetching new thumbnails for the news items. I have cleared all possible caches and it’s still not displaying them.
<img src="https://ibb.co/CWJtsX6" alt="Screenshot of the grid display of news with same thumbnails." />
We cannot share the page URL as it is only accessible with the member login.
Please let us know your feedback on this.
Thanks.
February 21, 2023 at 1:05 am #12555Aakash ChakravarthyKeymasterHi Zach,
Thanks for using Super RSS Reader – PRO.
It seems the RSS feed item URL in the feed
https://news.google.com/rss/articles/CBMiS2h0dHBzOi8vc291dGhjb2FzdGhlcmFsZC5jby56YS80ODg0NzUvd2hhdHMtdGhlLWJpZy1kZWFsLWFib3V0LXNlbGYtZXN0ZWVtL9IBTmh0dHBzOi8vc291dGhjb2FzdGhlcmFsZC5jby56YS80ODg0NzUvd2hhdHMtdGhlLWJpZy1kZWFsLWFib3V0LXNlbGYtZXN0ZWVtL2FtcA?oc=5
is not HTTP redirected to the original site.Hence the thumbnail image is not picked.
Looks like Google made this change recently.
You can enter the above URL in this page https://www.redirect-checker.org/index.php and see that the page is not reaching the source page.
Looks like Google has switched to Javascript based redirection. Redirection like this cannot be identified.
I can’t think of any immediate solution for this. I would suggest find an alternate RSS feed for the same purpose or use different RSS feed source.
I’ll update you if I found anything on this.
Thanks,
AakashFebruary 27, 2023 at 12:57 pm #12597Zach SchmitParticipantHi Aakash,
Thank you for bringing the issue with the RSS feed URL in Super RSS Reader – PRO to our attention. We appreciate your diligence in investigating this issue and providing us with detailed information.
We understand that the thumbnail image is not being picked due to the recent change made by Google, and that there is no immediate solution available for this. We would like to know if this issue is a priority for you and your team, and what timeline you have in mind for fixing this issue.
Thanks.
February 27, 2023 at 11:46 pm #12598Aakash ChakravarthyKeymasterHi Zach,
Regarding the issue, the feature (fetching thumbnail from source website) itself works as expected without any issue.
It is that the URL in the feed item does not redirect to the original source article.
Super RSS Reader works with any RSS feed and not specific to Google news RSS feed.
Since Google RSS feed had changed the redirect logic, some specific logic must be added just for this Google news RSS feed. Other RSS feeds don’t need that.
This would be a custom requirement. I might need a week or so to think and work on this.
I’ll share a code once it is complete.
Thanks,
AakashMarch 30, 2023 at 6:47 pm #12704marty shueParticipantIs there any update regarding this matter?
March 31, 2023 at 12:42 am #12707Aakash ChakravarthyKeymasterHi Marty,
Please paste the code below in your theme’s
function.php
file.You can follow any method like in the below, if you are new to this
Since in your case the problem is with the RSS feed URL, I have written this personalized code to help you. Feel free to modify this as per your requirement.
(updated recently)
function srr_google_feed_meta( $meta, $feed_item ){ $url = $feed_item->get_link(); $cache_name = 'srr_gfou_' . md5( $url ); $original_url = get_transient( $cache_name ); if( $original_url === false ){ $page_html = SRR_URL_Metadata::fetch_page_html( $url ); $pattern = '/<a\s+[^>]*href="([^"]*)"[^>]*>/i'; if ( preg_match( $pattern, $page_html, $matches ) ) { $original_url = $matches[1]; if( get_option( 'srr_debug' ) ){ SRR_Admin::log( $original_url ); } set_transient( $cache_name, $original_url, WEEK_IN_SECONDS ); } } return SRR_URL_Metadata::get_meta_data( $original_url ); } add_filter( 'srr_mod_metadata_image', 'srr_google_feed_meta', 10, 2 );
Thanks,
AakashMarch 31, 2023 at 1:30 am #12708marty shueParticipantHi Aakash,
I’ve implemented the code above and it works perfectly.
THANK YOU!
April 1, 2023 at 12:57 am #12714Aakash ChakravarthyKeymasterHi Marty,
Happy that it works! Cheers!
Thanks,
Aakash -
AuthorPosts
- The topic ‘Fetching a single thumbnail for all Google RSS Feed.’ is closed to new replies.