Giter VIP home page Giter VIP logo

youtube-related's Introduction

youtube-related

PyPI

PyPI - Python Version

GitHub

PyPI - Downloads

Youtube Related Video Fetcher

Installation

python3 -m pip install youtube-related

Example

Basic usage

import youtube_related

print(youtube_related.fetch('Some Youtube Video URL'))

YouTube's featured video may be repeated regularly, and deque was used to prevent this.

from youtube_related import preventDuplication

Avoider: preventDuplication = preventDuplication()

print(Avoider.get('Some Youtube Video URL'))

youtube-related's People

Contributors

kijk2869 avatar dependabot[bot] avatar restyled-commits avatar

Stargazers

Kim Eunnho avatar  avatar Aashi avatar Frank Lin avatar  avatar Sambhav jain avatar yng._.min avatar TFAM_IS_LUV avatar vidya sagar avatar  avatar Park Seonu avatar  avatar

Watchers

 avatar

Forkers

mandruyd

youtube-related's Issues

ValueError while parsing raw data

>>> import youtube_related
>>> 
>>> print(youtube_related.get('https://youtu.be/D1PvIWdJ8xo'))
[{'id': 'nM0xDI5R50E', 'title': '[MV] IU(아이유) _ BBIBBI(삐삐)', 'duration': 209}, {'id': 'vhteDkmcvB8', 'title': 'IU 아이유  | Best Songs Of IU 아이유 최고의 노래모음 - IU 최고의 노래 컬렉션 - IU Spring Playlist 🌸', 'duration': 8300}, {'id': 'o_nxIQTM_B0', 'title': "[IU] Blueming Live Clip (2019 IU Tour Concert 'Love, poem')", 'duration': 280}, {'id': 'd9IxdwEFk1c', 'title': '[MV] IU(아이유) _ Palette(팔레트) (Feat. G-DRAGON)', 'duration': 219}, {'id': 'JyXjf09-WNc', 'title': '✔아이유 IU 노래모음 6탄/112곡/7시간', 'duration': 25333}, {'id': 'TgOu00Mf3kI', 'title': '[MV] IU(아이유) _ eight(에잇) (Prod.&Feat. SUGA of BTS)', 'duration': 222}, {'id': 'Fyd1BiP6ipg', 'title': '[어디선가 들어본 노래 Playlist] 제목은 모르더라도, 한때 지겹도록 들었던', 'duration': 8610}, {'id': 'BzYnNdJhZQw', 'title': '[MV] IU(아이유) _ Through the Night(밤편지)', 'duration': 283}, {'id': 'yqtCGojXEpM', 'title': "IU(아이유) 'Blueming(블루밍)' 라이브🎤🎤(밴드ver.) | 가사 | 스페셜클립 | Special Clip | LYRICS [4K]", 'duration': 247}, {'id': 'f_iQRO5BdCM', 'title': 'IU(아이유) _ YOU&I(너랑나) MV', 'duration': 534}]
>>> print(youtube_related.get('https://youtu.be/D1PvIWdJ8xo'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shilu/.local/lib/python3.8/site-packages/youtube_related/client.py", line 9, in get
    Data = parse(RAW)
  File "/home/shilu/.local/lib/python3.8/site-packages/youtube_related/parser.py", line 20, in parse
    Data = __loadInitialData(RAW)
  File "/home/shilu/.local/lib/python3.8/site-packages/youtube_related/parser.py", line 11, in __loadInitialData
    raise ValueError
ValueError

If you request 30 times, you'll get ValueError about 1 ~ 2 times.

Using Python 3.8.5 with latest version of this library.

Cases are not match

Repo name and lib name is snake case but its using PascalCase and camelCase. This makes me confusing while using this moudle. Thx for making this lib. I'm using it quite well. Happy Hacking XD

IP option add

To avoid 429 state of youtube, it can be set source-address.

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.