Skip to content

Download images from google query #4853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 16, 2021

Conversation

appledora
Copy link
Contributor

@appledora appledora commented Oct 1, 2021

Added new script web_programming/show_image_tab_from_google_query.py to open the google image tab with a search query. It includes documentations and doctests. Modularized the script and made it more customizable. Fixed formatting using black and flake8.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [] If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@appledora appledora requested a review from cclauss as a code owner October 1, 2021 15:33
@ghost ghost added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels Oct 1, 2021
@ghost ghost mentioned this pull request Oct 5, 2021
14 tasks
@appledora
Copy link
Contributor Author

@cclauss any review for this one?

@appledora
Copy link
Contributor Author

@poyea can i get a review on this? I had mistakenly pushed another PR without checking the boxes, which got marked as invalid, so I can't work on new PRs anymore rn :|

@ghost ghost removed the tests are failing Do not merge until tests pass label Oct 9, 2021
@poyea
Copy link
Member

poyea commented Oct 15, 2021

I'd suggest this go into crawl_google_results.py.

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is starting to look great!

@ghost ghost added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Oct 15, 2021
using iterators instead of lists

Co-authored-by: Christian Clauss <[email protected]>
@ghost ghost added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Oct 15, 2021
appledora and others added 4 commits October 15, 2021 12:15
Improve readability by removing one-time used variable

Co-authored-by: Christian Clauss <[email protected]>
Decreasing complication through standard practices.

Co-authored-by: Christian Clauss <[email protected]>
Exception Handling

Co-authored-by: Christian Clauss <[email protected]>
@appledora
Copy link
Contributor Author

@cclauss I have changed the function entirely. Kindly, take a look. I tried to follow your idea and to implement this function I adapted this blog .

@@ -0,0 +1,42 @@
import sys
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my Mac, when I run python3 -m doctest -v web_programming/show_image_tab_from_google_query.py the tests fail. What happens on your computer?

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Oct 16, 2021
@cclauss cclauss merged commit 1522617 into TheAlgorithms:master Oct 16, 2021
@cclauss cclauss changed the title Show images from google query Download images from google query Oct 16, 2021
@appledora
Copy link
Contributor Author

appledora commented Oct 16, 2021

@cclauss Thank you very much. I have honestly learned the most while trying to get PRs accepted into this repo. And I really appreciate you for taking the time to monitor and help us, beginner contributors!! You have been an amazing teacher 😄

shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
* Added new script to open the google image tab with a search query.

* Added new script to open the google image tab with a search query.

* Added new script to open the google image tab with a search query with doctests.

* Fixed doctest error, removed print() from method, changed return type

* Update web_programming/show_image_tab_from_google_query.py

using iterators instead of lists

Co-authored-by: Christian Clauss <[email protected]>

* Update web_programming/show_image_tab_from_google_query.py

Improve readability by removing one-time used variable

Co-authored-by: Christian Clauss <[email protected]>

* Update web_programming/show_image_tab_from_google_query.py

Decreasing complication through standard practices.

Co-authored-by: Christian Clauss <[email protected]>

* Update web_programming/show_image_tab_from_google_query.py

Exception Handling

Co-authored-by: Christian Clauss <[email protected]>

* changed complete method to download images from google search query

* Update download_images_from_google_query.py

* Delete show_image_tab_from_google_query.py

Co-authored-by: Christian Clauss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants