Skip to content
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

Fixed pages that started with a wiki item and igore comitting the vsc… #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,11 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/

# Visual Studio Code
# The Visual Studio Code ignore file is maintained in a separate Visual-Studio-Code.gitignore that
# can be found at https://github.com/github/gitignore/blob/main/Global/Visual-Studio-Code.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire vscode folder.
.vscode/
3 changes: 3 additions & 0 deletions googlesearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def search(term, num_results=10, lang="en", proxy=None, advanced=False, sleep_in
link = result.find("a", href=True)
title = result.find("h3")
description_box = result.find("div", {"style": "-webkit-line-clamp:2"})
if not description_box:
# Page started with Wiki items should find the description here
description_box = result.find("div", {"style": "grid-area:nke7rc"})

if link and title and description_box:
link = result.find("a", href=True)
Expand Down