GithubHelp home page GithubHelp logo

Comments (6)

RyPoints avatar RyPoints commented on July 1, 2024 1

I've forked Djarnis' version here, as it returned results.

https://github.com/RyPoints/xgoogle

His version also had bugs though and many queries returned an error instead of results. This had to do with Google's author and actor additional info boxes and I've already modified it so results instead of errors are returned for author and actor queries. I'll likely continue to improve it and if you'd like, I could periodically merge the changes I make back to your Python 2 branch.

from xgoogle.

kenorb avatar kenorb commented on July 1, 2024

If you're using Python 3, you should use the master branch. The 'python2' branch is only for Python 2.

from xgoogle.

RyPoints avatar RyPoints commented on July 1, 2024

@kenorb In the example, I'm using both. In my local environment, pip3/python3 is Python 3 and pip/python is Python 2.

For Python 3 I'm using the master branch as you said. Python 3 works as expected.

For Python 2 I'm using the Python 2 branch. I get no output.

Locally, on my own machine, I'm okay with using either version and personally even prefer Python 3. However, I need the Python 2 version to run this in a server environment. I'm only doing some R&D example type things, but I need to run it on the server and for that I need Python 2.

from xgoogle.

RyPoints avatar RyPoints commented on July 1, 2024

If I install from pkrumins' repo I see this same no output issue. If I install from Djarnis' repo though I see output, but also see a parser warning.

pip install git+ssh://[email protected]/Djarnis/xgoogle
Successfully installed xgoogle-1.3

python seeker.py

/Library/Python/2.7/site-packages/beautifulsoup4-4.4.1-py2.7.egg/bs4/__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "lxml")

Quantum mechanics - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Quantum_mechanics
Introduction to quantum mechanics - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Introduction_to_quantum_mechanics
News for quantum mechanics

from xgoogle.

RyPoints avatar RyPoints commented on July 1, 2024

Downgrading from BeautifulSoup4 4.4 to BeautifulSoup4 4.3 removes the UserWarning, so I might go with Djarnis' code for now, but it would be nice to use this codebase for both Python 3 and Python 2.

from xgoogle.

kenorb avatar kenorb commented on July 1, 2024

Djarnis' code seems to be differ by only one commit with some fixes. I've generated PR (#14) from his fork into python2 branch, but there are some conflicts.

I won't have time to look at it soon, but free to solve the conflicts in order to fix the issue.

from xgoogle.

Related Issues (12)

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.