Git Product home page Git Product logo

producthunt-scraper's Introduction

producthunt-scraper ๐Ÿ•ธ

Set of basic script python scripts to fetch data from Product Hunt and analyze it.

Fetching

In both the scripts - product-fetcher.py and product-fetcher-async.py you can edit -

# start_date

start_date = {
    "year": 2022,
    "month": 1,
    "day": 1,
}

# end_date
end_date = {
    "year": 2022,
    "month": 1,
    "day": 15,
}

to change the date range for which you want to fetch the data.

A sample run would look something like this -

python product-fetcher.py                                                                             โ”€โ•ฏ
2022-01-01
2022-01-02
2022-01-03
2022-01-04
...
2022-01-15
Time taken to run the script: 5.975425720214844 seconds

After that, you can run the script using python product-fetcher.py or python product-fetcher-async.py depending on which script you want to run. This will crate a file products.csv in the same directory which will contain the data.

Analyzing

Once you have the data, you can run the product-analyzer.py script to analyze the data after setting correct path to the products.csv file in the script.

This script will output analysis in the terminal.

Product with highest votes: Fitmint with 6781 votes
Product with most comments: Via Protocol with 2257 comments
topic_name
Productivity         2262
Android               796
Design Tools          782
Web App               475
iOS                   338
Chrome Extensions     320
Developer Tools       310
Marketing             278
Fintech               242
Health & Fitness      198
...(more analysis)

Notes

  • These scripts were never meant to be published, so they might not be the best code. If you have any suggestions, feel free to open an issue or a PR.

  • this was used to create this twitter thread - ProductHunt Recap 2022

Ciao! ๐Ÿค™

producthunt-scraper's People

Contributors

toughyear avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

hupratt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.