Skip to content

Conversation

@shreenaathia
Copy link
Contributor

No description provided.

I proactively looked into the search engines another contributor has added but not yet been merged and created a test for one of those search engines
adding test for pySearch for duckduckgo
Copy link
Owner

@jrkong jrkong left a comment

Choose a reason for hiding this comment

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

I like the work on the scraper so far but let's keep this work out of this PR so this PR is only about the test you added.

import urllib
import webbrowser
from urllib.request import urlopen
from bs4 import BeautifulSoup
Copy link
Owner

Choose a reason for hiding this comment

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

What are you trying to achieve with BeautifulSoup? It's probably useful but can you put this under a different pull request? Let's keep this one to just the test for now.

html = self.url;
req = urllib.request.Request(html, headers={'User-Agent': 'Mozilla/5.0'})

soup = BeautifulSoup(urlopen(req).read(),"html.parser")
Copy link
Owner

Choose a reason for hiding this comment

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

I have a feeling this is part of another PR that you're working on. I think this conversation should occur on another issue however I do like the direction you're taking it in. Going off of what I can read I think you're trying to scrape the links from the site to populate some results. This is great but I don't think it should be part of the base functionality.

I think this should be put behind a command line argument for now so the users can choose between simply opening the link or having a few results pop up.

Regardless, this is a bit off topic for this PR. Let's just keep this particular PR about the test so the changes are easier to track.

@pep8speaks
Copy link

Hello @shreenaathia! Thanks for updating the PR.

  • In the file pySearch.py, following are the PEP8 issues :

Line 1:1: E265 block comment should start with '# '
Line 6:80: E501 line too long (124 > 79 characters)
Line 7:80: E501 line too long (153 > 79 characters)
Line 8:80: E501 line too long (88 > 79 characters)
Line 14:27: W292 no newline at end of file

  • In the file search.py, following are the PEP8 issues :

Line 10:32: E251 unexpected spaces around keyword / parameter equals
Line 10:34: E251 unexpected spaces around keyword / parameter equals
Line 10:49: E251 unexpected spaces around keyword / parameter equals
Line 10:51: E251 unexpected spaces around keyword / parameter equals
Line 10:70: E251 unexpected spaces around keyword / parameter equals
Line 10:72: E251 unexpected spaces around keyword / parameter equals
Line 17:5: E265 block comment should start with '# '
Line 19:5: E265 block comment should start with '# '
Line 22:5: E265 block comment should start with '# '
Line 24:5: E265 block comment should start with '# '
Line 27:5: E265 block comment should start with '# '
Line 28:1: W293 blank line contains whitespace
Line 29:5: E265 block comment should start with '# '
Line 32:5: E265 block comment should start with '# '
Line 42:9: E265 block comment should start with '# '
Line 43:80: E501 line too long (105 > 79 characters)
Line 45:24: E703 statement ends with a semicolon
Line 45:25: W291 trailing whitespace
Line 46:80: E501 line too long (81 > 79 characters)
Line 48:49: E231 missing whitespace after ','
Line 50:9: E265 block comment should start with '# '
Line 51:12: E225 missing whitespace around operator
Line 55:9: E265 block comment should start with '# '
Line 56:55: E203 whitespace before ':'
Line 57:1: W293 blank line contains whitespace
Line 61:9: E265 block comment should start with '# '
Line 64:24: W291 trailing whitespace
Line 67:4: E114 indentation is not a multiple of four (comment)
Line 69:5: E265 block comment should start with '# '
Line 70:1: W293 blank line contains whitespace
Line 81:10: E114 indentation is not a multiple of four (comment)
Line 82:5: E265 block comment should start with '# '
Line 83:1: W293 blank line contains whitespace
Line 84:1: E265 block comment should start with '# '
Line 84:14: W292 no newline at end of file

Line 5:1: E302 expected 2 blank lines, found 1
Line 11:1: W293 blank line contains whitespace
Line 11:1: W391 blank line at end of file

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