Re: Error getting data from website

2019-12-07 Thread Michael Torrie
On 12/7/19 3:53 AM, Peter Otten wrote: > > ... because Amazon doesn' like what you do. You can cheat or play by their > rules and use the API. Yup and although I have no love for Amazon, I can understand why they don't want bots on the site. Already they have enough trouble with bots buying up m

Re: Error getting data from website

2019-12-07 Thread Peter Otten
Michael Torrie wrote: > On 12/6/19 5:31 PM, DL Neil via Python-list wrote: >> If you read the HTML data that the REPL has happily splattered all over >> your terminal's screen (scroll back) (NB "soup" is easier to read than >> is "content"!) you will observe that what you saw in your web-browser i

Re: Error getting data from website

2019-12-06 Thread Chris Angelico
On Sat, Dec 7, 2019 at 1:21 PM DL Neil via Python-list wrote: > > On 7/12/19 1:51 PM, Chris Angelico wrote: > > On Sat, Dec 7, 2019 at 11:46 AM Michael Torrie wrote: > >> > >> On 12/6/19 5:31 PM, DL Neil via Python-list wrote: > >>> If you read the HTML data that the REPL has happily splattered a

Re: Error getting data from website

2019-12-06 Thread DL Neil via Python-list
On 7/12/19 1:51 PM, Chris Angelico wrote: On Sat, Dec 7, 2019 at 11:46 AM Michael Torrie wrote: On 12/6/19 5:31 PM, DL Neil via Python-list wrote: If you read the HTML data that the REPL has happily splattered all over your terminal's screen (scroll back) (NB "soup" is easier to read than is

Re: Error getting data from website

2019-12-06 Thread Chris Angelico
On Sat, Dec 7, 2019 at 11:46 AM Michael Torrie wrote: > > On 12/6/19 5:31 PM, DL Neil via Python-list wrote: > > If you read the HTML data that the REPL has happily splattered all over > > your terminal's screen (scroll back) (NB "soup" is easier to read than > > is "content"!) you will observe th

Re: Error getting data from website

2019-12-06 Thread Michael Torrie
On 12/6/19 5:31 PM, DL Neil via Python-list wrote: > If you read the HTML data that the REPL has happily splattered all over > your terminal's screen (scroll back) (NB "soup" is easier to read than > is "content"!) you will observe that what you saw in your web-browser is > not what Amazon serve

Re: Error getting data from website

2019-12-06 Thread DL Neil via Python-list
On 7/12/19 12:53 PM, Sam Paython wrote: This is the code I am writing: import requests from bs4 import BeautifulSoup request = requests.get("https://www.amazon.ca/dp/B07RZFQ6HC";) content = request.content soup = BeautifulSoup(content, "html.parser") element = soup.find("span",{"id":"priceblock_d