Coder Social home page Coder Social logo

google-search-results-php's People

Contributors

alaa-abdulridha avatar atefbb avatar dimitryzub avatar drewroberts avatar encreinformatique avatar exfriend avatar freaky avatar hartator avatar ilyazub avatar jvmvik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-search-results-php's Issues

Timeouts when using the PHP library

We are using the library to pull Google reviews. Very frequently, we get errors like this, where it says 'cURL error 28: Operation timed out after 5009 milliseconds with 0 bytes received'.

Is there a way to increase the timeout limit to something like 60 seconds?

Update PHP version to 8.1.3

Throws an error when updating google-search-results-php to latest 2.0 version.

Local version is 1.2.0:

$ composer show
serpapi/google-search-results-php 1.2.0 Google search result via Serp API

Updating via composer to version 2.0:

$ composer require serpapi/google-search-results-php:2.0

Error:

- serpapi/google-search-results-php 2.0 requires php ^5.5 || ^7.0 -> your php version (8.1.3) does not satisfy that requirement.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Pretty much a duplicate of PHP 8 #7 issue.

PHP 8

We're relying on this package and need it to support PHP version 8. Are there any plans to upgrade the PHP requirement?

Package name invalid

Hi, I tried to submit the project to packagist.org to get it work with an other composer project but I got this error.

The package name SerpAPI/google-search-results-php is invalid, it should not contain uppercase characters. We suggest using serp-api/google-search-results-php instead.

Please change the name of the package
Regards
Jo

Access to Google Scholar BiBTeX data

Thank you for this API!! It is good to see that at last someone is working on this officially. I've tried scraping Google Scholar via some code I wrote using Swift and whilst I was able to parse each entry, my code was temperamental because of Google's anti-robot mechanisms. Because I was using Swift's internal http client, I had issues with some cookie information that caused Google Scholar to invoke reCaptcha during my runs.

Whilst this issue pertains to extending the API to enable access to the BiBTeX reference information (and other formats for that matter), I would also like to point out that (often) the reference data on Google Scholar is not as accurate as it could be. For example, using the playground to find "M-Coffee: combining multiple sequence alignment methods with T-Coffee" and comparing the returned data with Google Scholar's BiBTeX information as well as Oxford's Academic Database, the discrepancies will be clear:

Google Scholar's BiBTeX data for this paper (No DOI information):

@article{wallace2006m,
  title={M-Coffee: combining multiple sequence alignment methods with T-Coffee},
  author={Wallace, Iain M and O'sullivan, Orla and Higgins, Desmond G and Notredame, Cedric},
  journal={Nucleic acids research},
  volume={34},
  number={6},
  pages={1692--1699},
  year={2006},
  publisher={Oxford University Press}
}

Oxford Academic's data on the paper: https://academic.oup.com/nar/article/34/6/1692/2401531

Data returned by this API (Only three of the four authors mentioned):

{
    "search_metadata":
    {
        "id": "5f4bc5a9002fca2990aa41c2",
        "status": "Success",
        "json_endpoint": "https://serpapi.com/searches/48162f4a4112bb86/5f4bc5a9002fca2990aa41c2.json",
        "created_at": "2020-08-30 15:28:41 UTC",
        "processed_at": "2020-08-30 15:28:41 UTC",
        "google_scholar_url": "https://scholar.google.com/scholar?q=M-Coffee%3A+combining+multiple+sequence+alignment+methods+with+T-Coffee&hl=en",
        "raw_html_file": "https://serpapi.com/searches/48162f4a4112bb86/5f4bc5a9002fca2990aa41c2.html",
        "total_time_taken": 0.82
    }
    ,
    "search_parameters":
    {
        "engine": "google_scholar",
        "q": "M-Coffee: combining multiple sequence alignment methods with T-Coffee",
        "hl": "en"
    }
    ,
    "search_information":
    {
        "organic_results_state": "Results for exact spelling",
        "query_displayed": "M-Coffee: combining multiple sequence alignment methods with T-Coffee"
    }
    ,
    "organic_results":
    [
        "0":
        {
            "position": 0,
            "title": "M-Coffee: combining multiple sequence alignment methods with T-Coffee",
            "result_id": "_3o-xhuGyg0J",
            "link": "https://academic.oup.com/nar/article-abstract/34/6/1692/2401531",
            "snippet": "We introduce M-Coffee, a meta-method for assembling multiple sequence alignments (MSA) by combining the output of several individual methods into one single MSA. M-Coffee is an extension of T-Coffee and uses consistency to estimate a consensus alignment. We show that the procedure is robust to variations in the choice of constituent methods and reasonably tolerant to duplicate MSAs. We also show that performances can be improved by carefully selecting the constituent methods. M-Coffee outperforms all the individual methods …",
            "publication_info":
            {
                "summary": "IM Wallace, O O'sullivan, DG Higgins… - Nucleic acids …, 2006 - academic.oup.com",
                "authors":
                [
                    "0":
                    {
                        "name": "IM Wallace",
                        "link": "https://scholar.google.com/citations?user=oYUWc7YAAAAJ&hl=en&oi=sra"
                    }
                    ,
                    "1":
                    {
                        "name": "O O'sullivan",
                        "link": "https://scholar.google.com/citations?user=rYniXB8AAAAJ&hl=en&oi=sra"
                    }
                    ,
                    "2":
                    {
                        "name": "DG Higgins",
                        "link": "https://scholar.google.com/citations?user=Ap0K7rUAAAAJ&hl=en&oi=sra"
                    }
                ]
            }
            ,
            "resources":
            [
                "0":
                {
                    "title": "oup.com",
                    "file_format": "HTML",
                    "link": "https://academic.oup.com/nar/article/34/6/1692/2401531"
                }
            ]
            ,
            "inline_links":
            {
                "serpapi_cite_link": "https://serpapi.com/search.json?engine=google_scholar_cite&q=_3o-xhuGyg0J",
                "html_version": "https://academic.oup.com/nar/article/34/6/1692/2401531",
                "cited_by":
                {
                    "total": 508,
                    "link": "https://scholar.google.com/scholar?cites=993754121636838143&as_sdt=5,44&sciodt=0,44&hl=en",
                    "serpapi_scholar_link": "https://serpapi.com/search.json?cites=993754121636838143&engine=google_scholar&hl=en&q=M-Coffee%3A+combining+multiple+sequence+alignment+methods+with+T-Coffee"
                }
                ,
                "related_pages_link": "https://scholar.google.com/scholar?q=related:_3o-xhuGyg0J:scholar.google.com/&scioq=M-Coffee:+combining+multiple+sequence+alignment+methods+with+T-Coffee&hl=en&as_sdt=0,44",
                "versions":
                {
                    "total": 18,
                    "link": "https://scholar.google.com/scholar?cluster=993754121636838143&hl=en&as_sdt=0,44",
                    "serpapi_scholar_link": "https://serpapi.com/search.json?cluster=993754121636838143&engine=google_scholar&hl=en&q=M-Coffee%3A+combining+multiple+sequence+alignment+methods+with+T-Coffee"
                }
            }
        }
    ]
}

php 8.2 support

Hi there, is there a plan to support php 8.2 soon?

`Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 266

Deprecated: Return type of RestClient::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 66

Deprecated: Return type of RestClient::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 74

Deprecated: Return type of RestClient::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 70

Deprecated: Return type of RestClient::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 78

Deprecated: Return type of RestClient::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 61

Deprecated: Return type of RestClient::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 84

Deprecated: Return type of RestClient::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 90

Deprecated: Return type of RestClient::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 99

Deprecated: Return type of RestClient::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/vagrant/sb/main/vendor/serpapi/google-search-results-php/restclient.php on line 103`

Please keep the minimum of conventions

Currently, this cannot be integrated nicely into a own project. Please use namespaces for your code and tag the final versions, otherwise everyone will have to integrate your repo into their own project on the dev-master state or a dedicated commit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.