Python library requests return "Error 503" opening a link on heroku Python library requests return "Error 503" opening a link on heroku heroku heroku

Python library requests return "Error 503" opening a link on heroku


I was trying to write a code that takes google search results as links

searchinput = "dogs"print('Searching...')    google_search = requests.get('https://www.google.com/search?q='+searchinput)soup = bs4.BeautifulSoup(google_search.text , 'html.parser')search_results = soup.select('div#main > div > div > div > a')#for each in search_results:   #print (each)   #print("-----------------------")#print (len(search_results))linksList = []......

and it was continuing with string operations. I had the same problem from requests. First you can use my code for requests and beatifulSoup. Maybe you can have a problem with request.get() as me and changing the format can help sometimes. Besides, Same problem happened to me after too many requests for same website. Connection blocks you to do it I guess. You can reboost your router. That was working for me.

Please write if your problem is solved with one these methods