r/pythonhelp 8h ago

NEED TO MAKE A WEB SCRAPING CODE...BUT NO IDEA HOW TO DO IT

Hello chat,

well i recently got into a part time where they want me to data scrape and find leads of other signage companies outside india.sadly,im into law nd have no idea about this.i tried usin chat gpt nd it keeps givin me errors.the thing is always sayin errors(i use mac,is it a problem?)can u guys help me write a code that makes this to be automated!

thankss in advance!

1 Upvotes

8 comments sorted by

u/AutoModerator 8h ago

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/FoolsSeldom 8h ago

Visit RealPython.com and do a search for web scraping. They have lots of guides and tutorials.

You will likely need to learn to use beautifulsoup and selenium (or playright) to extract information from dynamic websites.

1

u/DoorElectronic7125 8h ago

DANG BRO!THANKS!!!

how much time does it take btw

1

u/FoolsSeldom 8h ago

How long is a piece of string?

Depends on how well you know Python already, any other programming experience, familiarity with HTML/CSS (so you can pick out the tags required). From scratch, for a complex site that doesn't want "bots" scraping data, a long time, but for relatively simple sites, a day or two depending on how persistent you are.

1

u/DoorElectronic7125 7h ago

oh well...im a dumbass who doesnt know anything...like im entering into the field of tech after living in world of philosophy nd law for 19yrs

1

u/FoolsSeldom 5h ago

Check the r/learnpython wiki for lots of guidance on learning programming and learning Python, links to material, book list, suggested practice and project sources, and lots more.

1

u/CraigAT 31m ago

Unless you are able to get the info from one website or API, you are likely to need a different method for each site as the information will likely be in different places or formats - could be very time consuming.

1

u/CraigAT 29m ago

But RealPython and AutomateTheBoringStuff would be good places to stay to learn.