Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Editing a URL template

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
mrmantle
Posts: 2
Joined: 2018-08-29 12:14

Editing a URL template

#1 Post by mrmantle »

Hi Guys,

In my .py file I want to edit this code so I can do my own google searches.

Where abouts do I add my own google search keywords.

# URL templates to make Google searches.
url_home = "https://www.google.%(tld)s/"
url_search = "https://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&btnG=Google+Search&tbs=%(tbs)s&safe=%(safe)s&tbm=%(tpe)s"
url_next_page = "https://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&start=%(start)d&tbs=%(tbs)s&safe=%(safe)s&tbm=%(tpe)s"
url_search_num = "https://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&num=%(num)d&btnG=Google+Search&tbs=%(tbs)s&safe=%(safe)s&tbm=%(tpe)s"
url_next_page_num = "https://www.google.%(tld)s/search?hl=%(lang)s&q=%(query)s&num=%(num)d&start=%(start)d&tbs=%(tbs)s&safe=%(safe)s&tbm=%(tpe)s"

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Editing a URL template

#2 Post by debiman »

mrmantle wrote:Where abouts do I add my own google search keywords.
where it says (query).

mrmantle
Posts: 2
Joined: 2018-08-29 12:14

Re: Editing a URL template

#3 Post by mrmantle »

So I replace the word query like this (My google search)?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Editing a URL template

#4 Post by debiman »

with or without brackets, yes.

Post Reply