Jul-09-2020, 03:19 PM
Hi
,
I'm new in Python programmation. I have followed a tutorial and written the code down below. (in between the stars)
I don't understand why only a part of the code in scraped.
I was looking to scrape the "productTitle" id.
I can find in on the source code but not when Scraping.
Can anyone explain me why ?
And what should I do to scrape the whole code and not only a part ?
Thx
***************************************************************
import requests
from bs4 import BeautifulSoup
URL = "https://www.amazon.fr/Zoom-F1-LP-IF-Console-denregistrement/dp/B079NWS24D/ref=sr_1_2?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=zoom+f1&qid=1593959235&sr=8-2"
r = requests.get(URL)
soup=BeautifulSoup(r.content, 'html5lib')
print(soup.prettify())
***************************************************************

I'm new in Python programmation. I have followed a tutorial and written the code down below. (in between the stars)
I don't understand why only a part of the code in scraped.
I was looking to scrape the "productTitle" id.
I can find in on the source code but not when Scraping.
Can anyone explain me why ?
And what should I do to scrape the whole code and not only a part ?
Thx
***************************************************************
import requests
from bs4 import BeautifulSoup
URL = "https://www.amazon.fr/Zoom-F1-LP-IF-Console-denregistrement/dp/B079NWS24D/ref=sr_1_2?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=zoom+f1&qid=1593959235&sr=8-2"
r = requests.get(URL)
soup=BeautifulSoup(r.content, 'html5lib')
print(soup.prettify())
***************************************************************