google-search

Why does Google Search return HTTP Error 403?

半城伤御伤魂 提交于 2019-11-27 20:09:53
Consider the following Python code: 30 url = "http://www.google.com/search?hl=en&safe=off&q=Monkey" 31 url_object = urllib.request.urlopen(url); 32 print(url_object.read()); When this is run, an Exception is thrown: File "/usr/local/lib/python3.0/urllib/request.py", line 485, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden However, when this is put into a browser, the search returns as expected. What's going on here? How can I overcome this so I can search Google programmatically? Any thoughts? If you want to do

Navigating Google search results using keyboard shortcuts [closed]

点点圈 提交于 2019-11-27 19:52:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Some will think this is not related to programming but I think it is, because most of the time when I encounter programming issues I search on Google to find solutions or ways to do what I plan to do before I start writing it from scratch. Let's face it, we all copy pasters... I don't like to remove my hands

Google Search Web Scraping with Python

流过昼夜 提交于 2019-11-27 16:56:05
问题 I've been learning a lot of python lately to work on some projects at work. Currently I need to do some web scraping with google search results. I found several sites that demonstrated how to use ajax google api to search, however after attempting to use it, it appears to no longer be supported. Any suggestions? I've been searching for quite a while to find a way but can't seem to find any solutions that currently work. 回答1: You can always directly scrape Google results. To do this, you can

Designing a web crawler

戏子无情 提交于 2019-11-27 16:36:27
I have come across an interview question "If you were designing a web crawler, how would you avoid getting into infinite loops? " and I am trying to answer it. How does it all begin from the beginning. Say Google started with some hub pages say hundreds of them (How these hub pages were found in the first place is a different sub-question). As Google follows links from a page and so on, does it keep making a hash table to make sure that it doesn't follow the earlier visited pages. What if the same page has 2 names (URLs) say in these days when we have URL shorteners etc.. I have taken Google

Programmatically get Google search results

 ̄綄美尐妖づ 提交于 2019-11-27 16:34:09
问题 How can I get Google search results from inside a program? I need to get an array of search results for a specified string. 回答1: C++ requires a little more work then other languages. You will need to connect to Google's REST Search API and then use a JSON parser to parse out the search results. Json.org has a collection of JSON parsers in various languages. 回答2: Use their javascript search API http://code.google.com/apis/ajaxsearch/ They no longer support their SOAP search api unfortunately

Is there a way to programmatically access Google's search engine results?

有些话、适合烂在心里 提交于 2019-11-27 12:19:37
Does google offer a way to programmatically see their search engine results for a certain query? I want to build a tracking application so that a user can see what rank on the google results their website is for certain keywords. EDIT: The behavior of the program would be: every day the program queries Google for the desired phrases, sees what position the user's websites are, and emails the users an update of their positions for their phrases. I want to be sure to comply with Google's terms of service too. John After finding this question I have been researching as the other answers seem out

How can I add a Google search box to my website?

£可爱£侵袭症+ 提交于 2019-11-27 12:08:31
I am trying to add a Google search box to my own website. I would like it to search Google itself, not my site. There was some code I had that use to work, but no longer does: <form method="get" action="https://www.google.com/search"> <input type="text" name="g" size="31" value=""> </form> When I try making a search, it just directs to the Google homepage. Well, actually it directs here: https://www.google.com/webhp Does anyone have a different solution? What am I doing wrong? Sorry for replying on an older question, but I would like to clarify the last question. You use a "get" method for

Does JSON-LD have to be embedded?

混江龙づ霸主 提交于 2019-11-27 12:07:53
We are currently using the Microdata format to expose data to search engines and we are looking at exposing more info to be able to support some more advanced Google Search features. As I'm working my way through the fields I'm finding I need information that we currently load asynchronously so it is not a part of the initial response. JSON-LD looks like its what Google prefers but all the examples I've seen have it embedded in the page. Could you have a link to a JS file so it gets loaded as a separate call? Something like <script type="application/ld+json" src="/myid123/jsonld.js"></script>

Looking for special characters in Google [closed]

二次信任 提交于 2019-11-27 10:13:53
问题 Do you know how to look for special characters with google...? I'm looking at bash code and there's the ## operator. I would like to know what It does but I wasn't able to figure out a way to protect the character (I'm not sure it's even possible). This is particularly annoying when you're looking for some code patterns, some characters are always ignored. 回答1: Google strips most punctuation from queries, as described here, so it won't help you with the bash syntax. It's very easy to search

Links below site in google search

女生的网名这么多〃 提交于 2019-11-27 09:35:27
When I search for some sites like amazon in google , I see the link and description of amazon. Below the main link I also see some smaller links like Books , Music , DVD etc How can we get these links for our own site ? Are these sitemaps ? Those are Google Sitelinks . You can block them by using Google Webmaster Tools, however they are auto-generated, and can only be remove-picked. After Google Webmaster Tools: Sitelinks are links to a site's interior pages. Not all sites have sitelinks. Google generates these links automatically, but you can remove sitelinks you don't want. (...) Sitelinks