Code Monkey home page Code Monkey logo

libstats-bot's Introduction

Hi there ๐Ÿ‘‹

I use Python/C/Bash.

I use Linux (Arch/Manjaro), my plans include creating my distributive based on Arch linux.

I write code in Visual Studio Code.

My Skills

libstats-bot's People

Contributors

dellyis avatar helish88 avatar vizus-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libstats-bot's Issues

instead of parsing site you can use github api https://docs.github.com/en/rest

stars = soup.find("span", {'class': "Counter js-social-count"}).text

example

import aiohttp
import asyncio


async def get_repo_starts() -> int:
    async with aiohttp.request(
        "GET", "https://api.github.com/repos/DisnakeDev/disnake"
    ) as response:
        data = await response.json()
    return data["stargazers_count"]


stars = asyncio.run(get_repo_starts())
print(f"disnake stars: {stars}")```
![screenshot](https://user-images.githubusercontent.com/52331802/180846054-4976dbf2-90b3-4c4a-bc17-e825ebb7b7fc.png)

get repo issues via github api

issues = soup.find("span", {"id": "issues-repo-tab-count"}).text

image
image

import asyncio
import aiohttp


async def get_repo_issues() -> int:
    url = "https://api.github.com/search/issues?q=repo:disnakedev/disnake+type:issue+state:open"
    async with aiohttp.request("GET", url) as request:
        data = await request.json()

    total_issues = data["total_count"]
    return total_issues


issues = asyncio.run(get_repo_issues())
print(f"total issues: {issues}")```

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.