Skip to content
This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Added Duckduckgo search - #22

Open
thecr8tr wants to merge 1 commit into
rohithpr:masterfrom
thecr8tr:master
Open

Added Duckduckgo search#22
thecr8tr wants to merge 1 commit into
rohithpr:masterfrom
thecr8tr:master

Conversation

@thecr8tr

@thecr8tr thecr8tr commented Mar 6, 2016

Copy link
Copy Markdown

Added duckduckgo.

Comment thread pws/ddg.py
def search(query, num=10, start=0, sleep=True, recent=None, country_code=None):
if sleep:
wait(1)
url = generate_url(query)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

You're using only query. What about other arguments?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I used query: line 58
num & start: line 60
sleep: line 56

duckduckgo does not have a news search feature and does not give a date to
it's search results, so I did not use recent.

country_code is not set via the url. I suppose there is a way to
initialize the country by creating a session, but this is above my skill
set.

I just needed the code to do some work for me so I thought I would pay back
the favor.

On Sat, Mar 5, 2016 at 10:18 PM, Rohith PR notifications@github.com wrote:

In pws/ddg.py
#22 (comment):

+##################################################
+# Class
+##################################################
+class Ddg:
+

  • @staticmethod
  • def search(query, num=10, start=0, sleep=True, recent=None, country_code=None):
  •    if sleep:
    
  •        wait(1)
    
  •    url = generate_url(query)
    

You're using only query. What about other arguments?


Reply to this email directly or view it on GitHub
https://github.com/rohithpr/py-web-search/pull/22/files#r55132459.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants