meatyite / python-socialblade

Object oriented SocialBlade API wrapper
The Unlicense
18 stars 9 forks source link

Unable to display current subscribers #13

Closed MathiasEriksenCommits closed 4 years ago

MathiasEriksenCommits commented 4 years ago

Hello! so i was trying out this cool API and when i tried (and trust me i've tried a alot) i get this error, it is completely identicle with the one in the readme file and i can't seem to figure out why

File "c:\Users\matty\Desktop\Bonthi Bot\bot.py", line 13, in <module>
    print(pewdiepie_channel.get_subscriber_count())
  File "C:\Users\matty\AppData\Local\Programs\Python\Python38-32\lib\site-packages\socialblade\__init__.py", line 171, in get_subscriber_count
    return int(
ValueError: invalid literal for int() with base 10: ''
meatyite commented 4 years ago

Thanks for opening this issue! I have now fixed this (see commit). Now you'll only need to update using pip: pip install --upgrade socialblade and it should update to the latest hotfix (1.0.5.1)

meatyite commented 4 years ago

Uhh i'll keep this open until you respond if it worked.

MathiasEriksenCommits commented 4 years ago

Fixed the forst one haha now onto this thing here:

cloudscraper.exceptions
.CloudflareCode1020: Cloudflare has blocked this request (Code 1020 Detected).
meatyite commented 4 years ago

@AUTISTjens seems to be a problem with cloudflare, or it could be you are making excessive requests so cloudflare blocks it. If you have a dynamic IP restart your router

MathiasEriksenCommits commented 4 years ago

I am running the program on a VPS so i wouldn't be able to, and i am only calling it once.

meatyite commented 4 years ago

Well then I'll have to invistigate that. Tomorrow bcuz am tired

MathiasEriksenCommits commented 4 years ago

Take your time man, i am in no hurry :)

meatyite commented 4 years ago

OK so i just googled it, and apparently cloudflare error code 1020 means you violated the server's firewall rule. https://community.cloudflare.com/t/community-tip-fixing-error-1020-access-denied/66439 it something on cloudflare and socialblade's end, and it has to do something with the fact you're running it on a VPS because it doesn't occur otherwise from what i've seen.

meatyite commented 4 years ago

I am also curious as to what you're planning to do with this library, if you want to share :)

MathiasEriksenCommits commented 4 years ago

Hi sorry the late responce.. i am using it for my python coded discord bot.. i want to make a command that tells people my friends subscriber count .. it is a pretty staright forward thing and i found this unoffcial API and thought it must be easier than the YouTube API to get subscriber data from

meatyite commented 4 years ago

Closing for now, you can still comment