I have some problems with load page content through request python module - here is the code :
url ="http://www.bestbuy.com/site/macbooks/macbook-air/pcmcat378600050008.c?id=pcmcat378600050008"
headers = {
"User-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36"}
response = requests.get(url, headers=headers
page_source = response.content
print page_source
print len(page_source)
This code execute in timer function with (10) interval - time.sleep(10)
But the problem is - sometimes it's load full page with length about 408000 chars, and sometimes 176000 chars, every time I have these numbers!!! How I can understand what is the problem or it's a bug ? Or maybe server changing web-page content ? Then I tried to increase interval with 20, but the problem still on! Also the same issue is happened with urllib2 module!