获取';雷亚尔';谷歌搜索结果与Python

获取';雷亚尔';谷歌搜索结果与Python,python,search-engine,Python,Search Engine,我正在尝试做一件非常简单的事情,获取谷歌搜索的顶级结果URL,例如在Pandora上搜索LMFAO是(at在这里是有意的)我想接收链接www.Pandora.com/music/song/LMFAO/Yes。所有3个主要搜索引擎都会毫无问题地返回此结果 stackoverflow的标准响应似乎是使用GoogleAJAXAPI,但是。。。坦率地说,这完全是废话。完全奇怪的结果,即 http://lyrics.wikia.com/LMFAO:Yes http://www.pandora.com/mu

我正在尝试做一件非常简单的事情,获取谷歌搜索的顶级结果URL,例如在Pandora上搜索
LMFAO是
at
在这里是有意的)我想接收链接
www.Pandora.com/music/song/LMFAO/Yes
。所有3个主要搜索引擎都会毫无问题地返回此结果

stackoverflow的标准响应似乎是使用
GoogleAJAXAPI
,但是。。。坦率地说,这完全是废话。完全奇怪的结果,即

http://lyrics.wikia.com/LMFAO:Yes

http://www.pandora.com/music/artist/lmfao

http://www.pandora.com/music/song/goo%2Bgoo%2Bdolls/black%2Bballoon

http://new.music.yahoo.com/lmfao/

不幸的是,对查询的任何修改都没有给我带来任何成功,而对于更模糊的搜索,如ilike的安德里亚·鲍尔(Andrea Bauer)

Bing和Yahoo也提供API,但他们需要一个API才能获得开发ID,即没有程序分发

我还发现有人建议解析标准的谷歌页面,但它似乎不再起作用了

在我的网络浏览器中,谷歌返回页面的源代码看起来无法搜索


我能做些什么来获得“真实的”Google结果吗?

正如我在Groovy和Java上已经做的那样,这里的要点是通过URL请求Google,然后构造一个表示HTML的DOM文档(Java:,Python:??等效)。之后,使用XPath从DOM文档中收集链接,这样就可以从Google结果页面“排名”想要排名的站点


欢迎使用black hat?

此库可能会引起您的兴趣:


不幸的是,Xgoogle已经停止为我工作,但我发现只要你使用他们的RSS提要,必应并不介意删除他们的搜索结果


现在我只是重新注册通过urlopen获得的结果页面

@peter No我只是很惊讶有人会对一篇(毫无用处的)帖子进行表面上的修改,这篇帖子几乎是死线。
>>> from xgoogle.search import GoogleSearch, SearchError
>>> try:
...   gs = GoogleSearch("LMFAO Yes at Pandora")
...   gs.results_per_page = 50
...   results = gs.get_results()
...   for res in results:
...     print res.title.encode("utf8")
...     print res.desc.encode("utf8")
...     print res.url.encode("utf8")
...     print
... except SearchError, e:
...   print "Search failed: %s" % e
... 
Yes - LMFAO - Pandora Internet Radio
Information about Yes - LMFAO at Pandora.com. Pandora is the Internet radio service that helps you find new music based on your old and current favorites.
http://www.pandora.com/music/song/lmfao/yes

LMFAO - Pandora Internet Radio
Listen and find out more about LMFAO at Pandora.com. Pandora is the Internet ...
http://www.pandora.com/music/artist/lmfao

search engine - Getting the 'real' Google results with Python ...
I'm trying to do something very simple, get the top result URL of a Google search, f.e. for the search LMFAO Yes at Pandora ( at is intentional here) I want ...
http://stackoverflow.com/questions/5361735/getting-the-real-google-results-with-python

LMFAO:Yes Lyrics - LyricWiki - Music lyrics from songs and albums
This song is performed by LMFAO and appears on the album Party Rock (2009).LMFAO:Yes ... Pandora: search for… LMFAO • Yes. Wikipedia: search for… ...
http://lyrics.wikia.com/LMFAO:Yes

YouTube - LMFAO - YES
Oct 6, 2007 ... JUST ANOTHER DAY IN THE CAR 4 LMFAO... OFFICIAL LMFAO Myspace  - http://lmfaomusic.com http://partyrocklife.com/ for OFFICIAL Party Rock gear ...
http://www.youtube.com/watch?v=nXPT8sw_FjU

Yes Lyrics - Lmfao
The group LMFAO goes double platnium hayyy. I got a party man that's how I live. So I take my elevator to the club in my crib like [Chorus:] Yes it's on and ...
http://www.6lyrics.com/yes10-lyrics-lmfao.aspx

LMFAO - YES LYRICS
1 post - Last post: Jun 3, 2010Lmfao Yes lyrics in the Party Rock Album. These Yes lyrics are performed by Lmfao Get the music video and song lyrics here.
http://www.metrolyrics.com/yes-lyrics-lmfao.html

Easy ChickHEN CFW installer (Without Pandora)
2 posts - 1 author - Last post: Jul 9, 2009Nice post! Smile I have the... Motherboard: TA-079v1, Model: Phat 100x, Hackable: yes, and Creates Pandora: yes. LMFAO! lol! Razz Very Happy ...
http://pspcoding.darkbb.com/t379-easy-chickhen-cfw-installer-without-pandora

Links on "Party Rock" | Facebook
EXCLUSIVE: Jamie Foxx Interview at LMFAO's "YES" Video Shoot - BVTV "Band of the ... Pandora Hau fuck yes party people! lmfao madness ...
http://www.facebook.com/posted.php?id=139241478710&share_id=145095215520613&comments=1

Pandora stays hot with investors - YEA!!! LMFAO!!! - ba.broadcast ...
Aug 31, 2010 ... Subject: Re: Pandora stays hot with investors - YEA!!! LMFAO! ... said that yes, Pandora was running an ad about every half hour. ...
http://groups.google.com/group/ba.broadcast/browse_thread/thread/947fb52042cd8211/41f25665629133cc?show_docid=41f25665629133cc

>>>