-
Notifications
You must be signed in to change notification settings - Fork 264
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
Now works on both Python 2 and 3 #343
Now works on both Python 2 and 3 #343
Conversation
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
Hi @cclauss! It looks like one or more of your builds have failed.
|
326927e
to
60b5675
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
Hi @cclauss! It looks like one or more of your builds have failed.
|
1 similar comment
Hi @cclauss! It looks like one or more of your builds have failed.
|
60b5675
to
b7fb6c7
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
b7fb6c7
to
770662d
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
770662d
to
84b3b4e
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
Rebased again. @ParthS007 @vaibhavsingh97 @AnshulMalik @bhaveshAn @gabru-md Your reviews please. |
84b3b4e
to
bff94b8
Compare
Hi @cclauss! It looks like one or more of your builds have failed.
|
@cclauss Checked your branch locally. Working fine. But Exalead search is not working with Python 3. |
bff94b8
to
d037f7a
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
d037f7a
to
c59d194
Compare
Is it useful continually re-base my pull requests? |
Resolve conflicts |
c59d194
to
3425fb5
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
Hi @cclauss! It looks like one or more of your builds have failed.
|
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
301a7e5
to
7d9f6ff
Compare
Hi @cclauss! Looks like your PR has some conflicts. 😟 |
Re-based yet again. |
Hey @cclauss, I'll have a look sometime today. You have a lot of patience :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
app/scrapers/ask.py
Outdated
@@ -25,7 +25,7 @@ def parseResponse(self, soup): | |||
title = div.div.a.text | |||
url = div.div.a['href'] | |||
try: | |||
p = div.find('p', {'class': 'PartialSearchResults-item-abstract'}) | |||
p = div.find('p', class_='PartialSearchResults-item-abstract') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 Compliance: This is equivalent functionality but requires fewer characters and PEP8 says that lines should 79 chars or less.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find previous one more readable.
Let's wait for what others say? @bhaveshAn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BeautifulSoup documentation tends to use the shorter form rather than creating and destroying a custom dict on every call. https://www.crummy.com/software/BeautifulSoup/bs4/doc/#searching-by-css-class class is of course a reserved word in Python, thus the trailing underscore convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but I still find the object notation more readable :P
That's why I was seeking other opinions @vaibhavsingh97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the PEP8 fix. It is not worth the wait.
219a29d
to
8fc6ccd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
2b9e12a
to
ce6f989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! Will merge after codacy test result
Merging Since it got two approval |
@cclauss One last thing before merge, can you change the commit message to something relevant |
ce6f989
to
2f294ea
Compare
Commit message is now: Add support for Python 3 |
Thanks for the patience and contribution |
Lookup scrapers by name, not by initial (fossasia#327) Add support for Python 3 (fossasia#343) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) changesmade to server.py to prevent XML attacks defusedxml
Lookup scrapers by name, not by initial (fossasia#327) Add support for Python 3 (fossasia#343) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) changesmade to server.py to prevent XML attacks defusedxml
Lookup scrapers by name, not by initial (fossasia#327) Add support for Python 3 (fossasia#343) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) Fixes fossasia#357 Add Mojeek in README (fossasia#358) Lookup scrapers by name, not by initial (fossasia#327) changesmade to server.py to prevent XML attacks defusedxml
Fixes #328, #265
Checklist
master
branch.Changes proposed in this pull request: