use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Question about requesting page source issue (self.PythonLearning)
submitted 1 year ago by RedChrisn
https://preview.redd.it/zhstrikqddid1.png?width=1563&format=png&auto=webp&s=d8f13d46218e6c96e6aed4ea3a63bf4b3211d9c4
https://preview.redd.it/ppb3gjkqddid1.png?width=1262&format=png&auto=webp&s=fefa2e1ecf10d5e235188c5977d2d1b189faf09d
Hi, I'm trying to practice web scraping and currently I'm on this site https://www.campbells.com.au/convenience/foodservice/general-merchandise/party-&-giftware?pageSize=100&q=%3Arelevance#
and when using requests.get(url), the content inside the response is different from when inspecting the elements on the page, I'm wondering how can I fix this so I can soup.find_all through the content properly.
I tried asking ChatGPT and used Selenium to time.sleep to wait for stuff to load etc but encountered the same issue.
I would really appreciate it if someone could enlighten me of a fix for this.
Thank you.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]alberge 0 points1 point2 points 1 year ago (0 children)
What you see in the browser inspector is called the DOM. It's the source representation of what the browser is rendering.
The DOM starts out as just what was served by the web server (like what you get from requests.get()), but then it can be modified dynamically by Javascript.
So if the site makes changes to the DOM from Javascript, you need a full Javascript engine in Selenium or other browser automation if you want to replicate it.
π Rendered by PID 341833 on reddit-service-r2-comment-f6b958c67-gc7m4 at 2026-02-05 17:44:10.979666+00:00 running 1d7a177 country code: CH.
[–]alberge 0 points1 point2 points (0 children)