Using Google news to fill your Autoblog

Status
Not open for further replies.

emp

New member
Jun 29, 2006
7,467
211
0
Google news is a nice way to get some content into your niche autoblog, but you will have some preparing to do. (For starters, get and install WP-o-Matic)
  • Point your browser to news.google.com
  • Enter your search phrase, for this example we will be using “chimpanzee birth” (Always good to keep up with the family)
  • Now look on the lower left navigation and press the link for “RSS”
  • You are taken to the page of the RSS feed, go and grab that URL. It should look like this:
Code:
http://news.google.ch/news?ie=UTF-8&oe=UTF-8&
rls=org.mozilla%3Aen-US%3Aofficial&client=firefox-a&um=1&
tab=wn&q=chimpanzee+birth&output=rss&ned=:ePkh8BM9EwLbwQq0w4AFqy1A
 qVyIFNweIwH_SKsbIrNcC6-xa3UWy88sBgBW2w2e
Unbelievably long Google link here
  • Enter that as feed address into a new WP-o-Matic campaign
  • Now we have to get rid of the nastiness that is the Google news link. Basically, Google does not give you the direct links in the feed , but redirects them via their servers. Luckily, we can get rid of them by way of the rewrite ability of WP-o-Matic.
  • Go to the “Rewrite” tab
  • Enter this for origin:
Code:
/http...news.*amp;url=(.*)&cid.*"{1}/
  • Check “Regex”
  • Under “Rewrite to” enter
Code:
$1
  • Check “rewrite”
  • Submit
Done.

Enjoy,
::emp::
 
  • Like
Reactions: Jondoe0069


Addendum:

For some reason, the articles do not show up right in preview. Once published, they are OK.

(That was part of my problem, troubleshooting was impossible until I found that out)
::emp::
 
  • Like
Reactions: ubaidabcd
This is great - thanks. I don't think rewrite is working correctly for me though - PMing you URLs.
 
Using "rewrite" feature from WP-o-Matic, google new link will be not clickable or redirect to your own website links (not google news link)?
 
I just checked again, working as described.

Make sure you
- CHECK the "Regex" box
- CHECK "rewrite" over the Rewrite to box.

::emp::
 
Thanks for this.

But question:
What's the difference between what this does and what RSS2Blog does when you choose "News" and google as the source? I "think" its the same thing.... your thoughts? ANyone know?
 
Phew.

Thanks again Emp. For whatever reason I had to change up the regex a bit.

I use Origin

Code:
/http:..news.google.com.*url=(.*)&cid.*"/i
and Rewrite to

Code:
$1"
Note, the &, after submitting the WP-o-Matic form, shows up as &. In other words, if I go back in to the Rewrite tab for the campaign, I see:

Code:
/http:..news.google.com.*url=(.*)&cid.*"/i
 
Scratch that. F@$#! I had it working and now it isn't again. Something seems real inconsistent with this part of the plugin. :mad:

Ahh - that's the problem. When my & is getting rewritten to & it breaks. So if I enter the feed URL, then go back and save it again, the regex gets fekked.
 
Ok I am a tard the links I get after clicking the rss button on bottom
left look like this hxxp://news.google.com/news?hl=en&ned=us&q=pontiac+atlanta&ie=UTF-8&output=rss

So the regex does not work. What can I do to get it to populate the url
like you showed above?
 
Ok I am a tard the links I get after clicking the rss button on bottom
left look like this hxxp://news.google.com/news?hl=en&ned=us&q=pontiac+atlanta&ie=UTF-8&output=rss

So the regex does not work. What can I do to get it to populate the url
like you showed above?

It'll work if you keep at it. Get a basic regex working, say /http/i to "test" (without quotes) then keep increasing your regex pattern.

I'm pretty comfortable with it now - PM me if you want some help. Emp was nice enough to help me.
 
I am having NO luck with this bitch! I start small and then it breaks, but every regexp tool I have says the code is correct....

BTW, I noticed there was a comment by the creator saying that the regex only does one replacement per line, and the content is coming in as one line with multiple links in it... I wonder if that is causing issues.... :-(
 
Yeah I spoke too f'n soon. I've been messing with this all night with no luck. Just emailed the author some details. Hope to get some response.

One thing you might want to try is editing the regex and replace from PhpMyAdmin (table wpo_campaign_word). One of the problems I was having was due to chars getting escaped when entered in the plug-in's forms. Even with that out of the way though - it's not matching correctly.

This is the last regex I was using:

Code:
http:..news.google.com.*amp;url=(.*).amp;cid=[^"]*

with replace

Code:
$1
 
Sadly, I could not help smap.
Looked at his setup and all, and it is NOT working.
Same feed, same regex, just doing nothing.

Anyone?
::emp::
 
Status
Not open for further replies.