I use the following source code:
import requestsurl = "https://www.baha.com/nasdaq-100-index/index/tts-751307/name/asc/1/index/performance/471"web = requests.get(url)print(web.status_code)url = "https://www.baha.com/adobe/stocks/details/tts-117450574"web = requests.get(url)print(web.status_code)url = "https://www.baha.com/advanced-micro-devices/stocks/details/tts-117449963"web = requests.get(url)print(web.status_code)url = "https://www.baha.com/airbnb-inc/stocks/details/tts-208432020"web = requests.get(url)print(web.status_code)url = "https://www.baha.com/alphabet-a/stocks/details/tts-117453820"web = requests.get(url)print(web.status_code)url = "https://www.baha.com/alphabet-c/stocks/details/tts-117453810"web = requests.get(url)print(web.status_code)
Most of the time only the first three pages can be parsed, after that there is no status code and the program seems to stop responding or I sometimes get a 503 response even though I could open the page in the browser.
How does the problem arise, how can I solve it?