-
Notifications
You must be signed in to change notification settings - Fork 263
Added Youtube support #291
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
Conversation
|
@bhaveshAn great work. |
9244501 to
794fe97
Compare
|
Hi @bhaveshAn! Looks like your PR has some conflicts. 😟 |
|
|
||
| def feedgen(query, engine, count=10): | ||
| if engine == 'q': | ||
| if engine in ['q', 't']: |
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.
Putting this logic in two different files can be the source of future bugs. Please encapsulate this logic in one file or the other but not in both.
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.
@cclauss Please review again
app/server.py
Outdated
| return bad_request(err) | ||
|
|
||
| if engine[0] == 'q': | ||
| if engine[0] in ['q', 't']: |
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.
Putting this logic in two different files can be the source of future bugs. Please encapsulate this logic in one file or the other but not in both.
app/scrapers/youtube.py
Outdated
| self.queryKey = 'search_query' | ||
|
|
||
| def parseResponse(self, soup): | ||
| """ Parse the response and return set of urls |
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.
This is not a set of URLs. It is a list of dicts. A set guarantees not repeats and this code does not do that. The items in the list are dicts that contain titles and links (urls).
[[Tile1,url1], [Title2, url2],..] should be changed to [{'title': Tile1, 'link': url1}, {'title': Tile2, 'link': url2}, ...] to make the result more clear to the reader
794fe97 to
dd28e51
Compare
|
Hi @bhaveshAn! Looks like your PR has some conflicts. 😟 |
| def parseResponse(self, soup): | ||
| """ Parse the response and return list of urls | ||
| Returns: urls (list) | ||
| [[Tile1,url1], [Title2, url2],..] |
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 returned values are not urls. They are dicts.
I know these changes were not tested under Python 3.
|
Hi @bhaveshAn! Looks like your PR has some conflicts. 😟 |
|
@mariobehling @niranjan94 Please review. |
|
Hi @bhaveshAn! Looks like your PR has some conflicts. 😟 |
|
Thanks! |
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
Implement absolute_import in Scrapers w/ tests
…fossasia#291) Now for every badge folder(CSV file) only one background image file is created.
Fixes #290
Checklist
masterbranch.Changes proposed in this pull request:
@gabru-md @cclauss @mariobehling please review. Providing the heroku deployment at https://immense-anchorage-24063.herokuapp.com/
Thanks !!