This is my code.
amazon = 'https://www.amazon.in/s/ref=nb_sb_noss_1?url=search-alias%3Daps
&field-keywords=%s'
prime = 'https://www.primevideo.com/search/ref=atv_nb_sr?phrase=%s&ie=UTF8'
if 'amazon' in query:
speak('What product shall I search for?')
amz_product = take Command().lower()
webbrowser.get(chrome_path).open(amazon%amz_product)
elif 'prime video' in query:
speak('What shall I play on prime')
prime_movie = takeCommand().lower()
webbrowser.get(chrome_path).open(prime%prime_movie)
Getting error as "ValueError: unsupported format character 'D' (0x44) at index 59
". This is for 'amazon' variable. For 'prime' variable, the code is working fine.
Not sure as how to fix the extra '%' symbol in snippet 'search-alias%3Daps
' in the link defined in 'amazon' variable.
Please let me know if you need more info over this. Any help would be appreciable. Thank you!!!