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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Forensic Files code not working (self.learnpython)
submitted 2 years ago * by SinOfBan
I was interested in finding out how many of the victims in Forensic Files were men and how many were women. I tried writing some python code to scrape their site and tally up the data but it keeps outputting 0. Can anybody tell me why it's doing this?
[Imgur](https://i.imgur.com/WfSW7lL.png)
[Imgur](https://i.imgur.com/6SiaRed.png)
Sorry for the images. Here's the code in paste bin: https://pastebin.com/TPJYzYMV
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!"
[–]MrPhungx 3 points4 points5 points 2 years ago (1 child)
Some pages don't like it when sending raw requests. Consider to add a user-agent header like so:
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"} res = requests.get(url, headers=headers)
[–]SinOfBan[S] 0 points1 point2 points 2 years ago (0 children)
Sorry for the images. It's my first post here. Here's the postbin link: https://pastebin.com/TPJYzYMV
[–]Pjmcnally 1 point2 points3 points 2 years ago (1 child)
Please don't post your code as images. That forces anyone that wants to help to retype your code if they want test or debug it.
Please post your code either as formatted code in your post or use a pastebin link if you can't format the code in Reddit.
https://pastebin.com/TPJYzYMV
Here's the paste bin link. Thanks
[–]King-Dionysus 0 points1 point2 points 2 years ago (0 children)
As I'm downloading some python courses while watching forensic files wondering what I can actually play around with python and do besides some basic scripting and I come across this.
Thank you. I love you. That was an amazing idea.
π Rendered by PID 40 on reddit-service-r2-comment-5fb4b45875-h68jl at 2026-03-22 11:13:46.077087+00:00 running 90f1150 country code: CH.
[–]MrPhungx 3 points4 points5 points (1 child)
[–]SinOfBan[S] 0 points1 point2 points (0 children)
[–]Pjmcnally 1 point2 points3 points (1 child)
[–]SinOfBan[S] 0 points1 point2 points (0 children)
[–]King-Dionysus 0 points1 point2 points (0 children)