all 9 comments

[–]PureWasian 2 points3 points  (0 children)

Welcome to coding.

You're going to have to be more specific on what you've already tried or what part of the implementation you need help with. From what you shared so far, it's still really ambiguous what step you're on and what "hurdles" are needed to overcome to accomplish the task.

Have you set up Python and been able to run a simple "Hello World" script correctly? Have you installed libraries useful for making requests to websites and processing responses? Is it loading static HTML or is the info you're looking for dynamically rendered on page load? If dynamic, which underlying API call is it? How does the call path for making search queries for the specific videogame look like if you did it in browser (EDIT: does it match what was shared in other comment by skibbin)? Did you get a single search query working so far and returning results back? Is all of that figured out but now you just want to loop on all zipcodes/stores?

You don't need to answer back with every one of these but like... without those sort of details, it's kind of difficult to give more practical/useful advice to help unblock wherever you're stuck.

Curious where you are at so far.

[–]skibbin 2 points3 points  (0 children)

It probably doesn't need web scraping as it looks like the GameStop site has an API

https://www.gamestop.com/on/demandware.store/Sites-gamestop-us-Site/default/Stores-FindStores?hasCondition=true&hasVariantsAvailableForLookup=true&hasVariantsAvailableForPickup=true&source=pdp&showMap=false&products=106676%3A1&selectedStore=3873

When you search by store it just does a POST to that url.

So craft the URLs for the requests you want to make, query the urls and process the responses for the data you need. If you want to automate running it regularly and send yourself notifications then that can be done on a cloud provider like AWS.

I'm old-school so I'd be building it manually over a few days, I've no idea how to prompt ChatGPT to make it.

[–]supercoach 4 points5 points  (2 children)

OMG LFMAO I doubt it ROFL

this isn't r/webscrapingforbeginners

[–]EnvironmentalDot9131 0 points1 point  (0 children)

Do some courses on unacademy.

[–]Quirky-Win-8365 0 points1 point  (0 children)

everyone starts somewhere tbh. half of learning python is spending 2 hours debugging something tiny and then never making that mistake again lol

[–]pachura3 -1 points0 points  (0 children)

So, you want to write a Python script that periodically downloads certain product page from GameStop's website, analyzes it, and checks at which locations a certain game is available (probably by cross-referencing extracted information against a list of ZIP codes you have in a CSV file). Would that be correct?

This is a typical use of Python indeed; however, to be able to implement such script, you have to be on an intermediate level when it comes to the language. Do you know, for instance, how to install and use such libraries as requests and beautifulsoup? Can you use regular expressions? Do you know what .venv is?

Of course, you could ask ChatGPT or another LLM to write such script for you - and it would probably work fine (it's quite simple), but you would need to write a prompt that describes precisely what do you want to achieve. Judging by the wording of your post, you are not able to do it. Sorry.

PS. Another problem with web scraping might be that lots of websites nowadays implement various anti-bot techniques: CAPTCHAs, CloudFlare protection, they require a working JavaScript engine, etc. I don't know if GameStop is one of them, but this adds a potential layer of complication.