google-search

Scraping/Parsing Google search results in Ruby

主宰稳场 提交于 2019-12-18 13:37:41
问题 Assume I have the entire HTML of a Google search results page. Does anyone know of any existing code (Ruby?) to scrape/parse the first page of Google search results? Ideally it would handle the Shopping Results and Video Results sections that can spring up anywhere. If not, what's the best Ruby-based tool for screenscraping in general? To clarify: I'm aware that it's difficult/impossible to get Google search results programmatically/API-wise AND simply CURLing results pages has a lot of

Google Custom Search with custom search box and button?

Deadly 提交于 2019-12-18 10:29:15
问题 I am trying to make a Google custom search (I just need some sort of search engine on my site), and I need to make it so that I can use my own search box (input field). I need it to be of exact size. I also need to be able to make my own button to search. I am going to need to be able to change the size and background of the search button. I am not completely sure yet, but I might actually need it to be a regular img. Does anyone know how to do this? If you cannot do this with Google, do you

How to get the referer search query from google?

痞子三分冷 提交于 2019-12-18 04:03:12
问题 As recently as two days ago, the following code worked to get the search query from google: $refer = parse_url($_SERVER['HTTP_REFERER']); $host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); $query = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY); if(strstr($host,'www.google.com')) { //do google stuff $qstart = strpos($query, 'q=') +2; $qend = strpos($query, '&', $qstart); $qlength = $qend - $qstart; $querystring = substr($query, $qstart, $qlength); $querystring = str_replace('q=','

How to get the referer search query from google?

拈花ヽ惹草 提交于 2019-12-18 04:03:02
问题 As recently as two days ago, the following code worked to get the search query from google: $refer = parse_url($_SERVER['HTTP_REFERER']); $host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); $query = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY); if(strstr($host,'www.google.com')) { //do google stuff $qstart = strpos($query, 'q=') +2; $qend = strpos($query, '&', $qstart); $qlength = $qend - $qstart; $querystring = substr($query, $qstart, $qlength); $querystring = str_replace('q=','

The desciption meta tag is not showing in a Google organic listing

大兔子大兔子 提交于 2019-12-17 21:19:09
问题 I have realised the desciption meta tag is not showing in a Google organic listing on a new site. Please see below the meta tags. I have always used these tags before without a problem. I have double checked the code and researched the correct syntax but can't see what is wrong. I also used a spider simulator at Webconfes and it saw the description tag. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <base href="//www

How can I get Google search result snippets of first page in Excel using VBA

天大地大妈咪最大 提交于 2019-12-17 21:01:27
问题 I have a list of 1000 keywords in A1:A1000 . I want to get the Google search result snippets of first page in corresponding cells of each keyword. Ex: search result snippets of A1 cell should be in B1 ... *1 and so on. Any help is much appreciated. 回答1: Consider the below example: Option Explicit Const TargetItemsQty = 30 ' results for each keyword Sub GWebSearchIECtl() Dim objSheet As Worksheet Dim objIE As Object Dim x As Long Dim y As Long Dim strSearch As String Dim lngFound As Long Dim

Does JSON-LD have to be embedded?

﹥>﹥吖頭↗ 提交于 2019-12-17 10:34:27
问题 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

Links below site in google search

寵の児 提交于 2019-12-17 09:57:51
问题 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 ? 回答1: 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.

Java Web Crawler for retrieving google search results

廉价感情. 提交于 2019-12-14 03:13:55
问题 This question has been asked many times before. However some of the APIs have changed over time and I want to know a good way to implement this. The best way to this would be using google search api. However, https://developers.google.com/custom-search/json-api/v1/overview tells there are only 100 free search queries per day. I will require more and I dont want to spend money to do it. I tried it using simple REST apis, however its mostly JavaScript code and I don't seem to find what I need

Why would M# be harder to Google than C#?

為{幸葍}努か 提交于 2019-12-13 19:43:21
问题 I read just now in a comment on another question titled Effective Googling for short names C# isn't bad to Google for at all. It would be a lot harder if it were called M#, by the way. Why? What am I missing? 回答1: It turns out I was somewhat wrong. I had thought that C# just happened to benefit from an understanding of musical keys - a search for "G#" finds plenty of results about the musical key of G#. (This is shown by experimentation, by the way - despite working at Google I don't know