why it is skipping the whole for loop?
<p>I have created a website scraper which will scrape all info from yellow pages (for educational purposes) </p>

<pre><code>def actual_yellow_pages_scrape(link,no,dir,gui,sel,ypfind,terminal,user,password,port,type):
print(link,no,dir,gui,sel,ypfind,terminal,user,password,port,type)
r = requests.get(link,headers=REQUEST_HEADERS)
soup = BeautifulSoup(r.content,"html.parser")
workbook = xlwt.Workbook()
sheet = workbook.add_sheet(str(ypfind))
count = 0

for i in soup.find_all(class_="business-name"):
        sheet.write(count,0,str(i.text))
        sheet.write(count,1,str("http://www.yellowpages.com"+i.get("href")))
        r1 = requests.get("http://www.yellowpages.com"+i.get("href"))
        soup1 = BeautifulSoup(r1.content,"html.parser")
        website = soup1.find("a",class_="custom-link")
        try:
            print("Acquiring Website")
            sheet.write(count,2,str(website.get("href")))
        except:
            sheet.write(count,2,str("None"))
        email = soup1.find("a",class_="email-business")
        try:
            print(email.get("href"))
            EMAIL = re.sub("mailto:","",str(email.get("href")))
            sheet.write(count,3,str(EMAIL))
        except:
            sheet.write(count,3,str("None"))
        phonetemp = soup1.find("div",class_="contact")
        try:
            phone = phonetemp.find("p")
            print(phone.text)
            sheet.write(count,4,str(phone.text))
        except:
            sheet.write(count,4,str("None"))
        reviews = soup1.find(class_="count")
        try:
            print(reviews.text)
            sheet.write(count,5,str(reviews.text))
        except:
            sheet.write(count,5,str("None"))
        count+=1
save = dir+"\\"+ypfind+str(no)+".xls"
workbook.save(save)
no+=1
for i in soup.find_all("a",class_="next ajax-page"):
    print(i.get("href"))
    actual_yellow_pages_scrape("http://www.yellowpages.com"+str(i.get("href")),no,dir,gui,sel,ypfind,terminal,user,password,port,type)
</code></pre>

<p>The code is my above portion of the scraper. I have created the break points at soup and in the for loop not even a single line of for loop gets executed. No errors thrown. I tried the same with printing numbers from 1-10 it works but this is not working why?</p>

<p>Thank you</p>

<p>Answer has been found,</p>

<p>I used a text visulaizer to find what is in "r.content" I soupified it and got a clean HTML and gone through the HTML file and finally found that the browser is unsupported so I removed the requests header and ran the code finally got what I wanted</p>

python