Create A Reddit Scraper Without API Key Using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2024
  • Reddit, a platform where millions of people share their ideas, opinions, and questions about anything. It’s also a data gold mine for data analytics, trend analysis, and market research. In this tutorial, I will show you how to scrape reddit data without using Reddit API access key in Python.
    📋 Source Code: / source-code-tw-n-10231...
    ► Buy Me a Coffee? Your support is much appreciated!
    -------------------------------------------------------------------------------------------
    ☕ Paypal: www.paypal.me/jiejenn/5
    ☕ Venmo: @Jie-Jenn
    💸 Join Robinhood with my link and we'll both get a free stock: bit.ly/3iWr7LC
    ► Support my channel so I can continue making free contents
    ---------------------------------------------------------------------------------------------------------------
    🛒 By shopping on Amazon → amzn.to/2JkGeMD
    👩‍💻 Follow me on Linked: / jiejenn
    🌳 Becoming a Patreon supporter: / jiejenn
    ✉️ Business Inquiring: TH-cam@LearnDataAnalysis.org
    #webscraping #python #reddit

ความคิดเห็น • 10

  • @xevenau
    @xevenau วันที่ผ่านมา

    I tried this but getting an error that it is fetching too fast. I did 60 second timer as well. Is there a fix for this?

  • @ericsandro
    @ericsandro 3 ชั่วโมงที่ผ่านมา

    Show. How to extract comment data from TH-cam without using the API???

  • @anamzakir-gi3zc
    @anamzakir-gi3zc 3 หลายเดือนก่อน

    is there a way i can save photos from a post?

    • @jiejenn
      @jiejenn  3 หลายเดือนก่อน

      Let me look into it.

    • @anamzakir-gi3zc
      @anamzakir-gi3zc 3 หลายเดือนก่อน

      @@jiejenn ive figured it out thanks.
      subreddit = await reddit.subreddit("cats")
      all = subreddit.search("flair:humor", time_filter="all")
      urllist = []
      redditors = []
      async for submission in all:
      if "gif" in str(submission.url) or "jpeg" in submission.url:
      urllist.append(submission.url)
      from here use PIL and requests to save to your files

    • @lovenyajain6835
      @lovenyajain6835 2 หลายเดือนก่อน

      @@jiejenn hey did you find any solution?
      I have been able to extract posts and comments but not photos.

  • @ShaneZarechian
    @ShaneZarechian 5 หลายเดือนก่อน

    Nice, how would you get comments?

    • @jiejenn
      @jiejenn  5 หลายเดือนก่อน +4

      You will need to figure out the url of the post first, then append /comment.json. For example www.reddit.com/r/CreditCards/comments/1b35tnk/discover_q2_2024_categories/comments

    • @ShaneZarechian
      @ShaneZarechian 5 หลายเดือนก่อน

      @@jiejenn Thanks!

    • @Zerius_Black
      @Zerius_Black 2 หลายเดือนก่อน +1

      @@jiejenn hey, with your code i do get an error for comments. How do i have to change the code? Does the url still work like this?