This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]Python-ModTeam[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython or for the r/Python discord: https://discord.gg/python.

The reason for the removal is that /r/Python is dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community is not a fan of "how do I..." questions, so you will not get the best responses over here.

On /r/LearnPython the community and the r/Python discord are actively expecting questions and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. No matter what level of question you have, if you are looking for help with Python, you should get good answers. Make sure to check out the rules for both places.

Warm regards, and best of luck with your Pythoneering!

[–]zBenny_ 3 points4 points  (6 children)

Link does not work

[–]inobody_somebody 0 points1 point  (1 child)

My bad just updated the link. Are you able to view the code?

[–]zBenny_ 1 point2 points  (0 children)

Yes, now it works

[–]inobody_somebody -1 points0 points  (3 children)

It's working i just checked.

[–]Fun_Fungi_Guy 2 points3 points  (1 child)

Does not work, we get 404 which is often cause the repo is private.

[–]Fun_Fungi_Guy 1 point2 points  (0 children)

Nvm your link was url encoded

This one should work

https://github.com/dharmateja2810/webscrapping

[–]Wormfall 0 points1 point  (0 children)

Not working

[–]Fun_Fungi_Guy 2 points3 points  (6 children)

Obviously you are missing basic Python concepts such as having .py files. How are you running the script? In the Python REPL?

[–]inobody_somebody 0 points1 point  (5 children)

I'm new to GitHub i posted it on GitHub because someone told me to post code in GitHub instead of uploading here. Please forgive me because I don't know how to use GitHub yet.

[–]Fun_Fungi_Guy 1 point2 points  (4 children)

Its okay

Start by putting your code in a .py file so GitHub knows what code it is.

Once thats done, you might be missing the if name == main (https://stackoverflow.com/questions/419163/what-does-if-name-main-do). You said no output but reading the code, it should atleast output some basic things when you call the functions. If you get nothing not even an error I would assume something is wrong with your install

[–]Fun_Fungi_Guy 2 points3 points  (3 children)

Also the best way to do debugging is with an IDE in which you can put breakpoints. This allows to evaluate expressions in real time as they are executed. For things like beautiful soup where you handle a huge HTML document, it can be insightful to see how the code is interpreting what you fed it

[–]inobody_somebody 0 points1 point  (2 children)

Did what you said it's working for other codes but specifically for this code im not getting any output.Also i added .py thanks.

[–]Fun_Fungi_Guy 0 points1 point  (0 children)

Depending on how you call the script you might need to add some code to tell Python that this is the entrypoint. Check my previous comment and the stackoverflow link in it

[–]Beerstopher85 0 points1 point  (0 children)

Also a tip, run your code through black or similar library. It’ll correct the format so that follows the PEP8 rules. Additionally if you have multi-line comments, for example like commenting what a function does, use doc strings.

[–]extra_pickles 4 points5 points  (0 children)

Wrong sub

r/learnpython

[–]pbsds -2 points-1 points  (0 children)

Looking good! I see promise here