Skip to main content

A python package to webscraping for youtube video data as title, video url, thumbnail url, and number of views.

Project description

TubeScrapy

A python package to webscrap for youtube video data as title, video url, thumbnail url, and number of views. The package runs packages Selenium and Webdriver to access Youtube page and copy videos informations. The process is expensive and remains about 5 seconds for search. The first search could take a little more time because package Webdriver will download and install the web driver to control Chrome browser.

Python minimal version

  • Python 3.8

Python packages required

  • Selenium 4.8.2
  • Webdriver-manager 3.8.5

Examples

First of all, import module:

import tube_scrapy

Create a new instance of TubeScrapy:

ts = TubeScrapy()

Create a variable to save video info searched using method search_video_info():

videos_infos = ts.search_video_info(
    search_title = 'Cheia de Manias Raça Negra', # search title or query
    add_to_search = 'karaoke', # will basiclly be concatened with search_title
    search_range = 5 # quantity of videos searched
)

The videos informations will be returned in a list of objects ScrapedVideoInfo, which have this structure:

ScrapedVideoInfo(
    title = title,              # youtube video title
    video_url = video_url,      # youtube video url
    thumbnail_url= thumbnail,   # video thumbnail url
    views = views               # video number of views
)

This is it, good coding! ;-) For more information, visit the project repository and relate any issue, please.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tube_scrapy-1.0.0b3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

tube_scrapy-1.0.0b3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file tube_scrapy-1.0.0b3.tar.gz.

File metadata

  • Download URL: tube_scrapy-1.0.0b3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for tube_scrapy-1.0.0b3.tar.gz
Algorithm Hash digest
SHA256 4241151c8177d4a12d6d6b32d2bad26aba8ed82a0c0b1fb2101b9a00c8942eb3
MD5 469d0a1d365d27d12119d640fca593ef
BLAKE2b-256 6fef1cae19c132456198a3ccf3532d657c0d0c985231c8f4fa31258cb012020e

See more details on using hashes here.

File details

Details for the file tube_scrapy-1.0.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for tube_scrapy-1.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fd54bbd875e79f1f89490c34108382a1b6399b8bf413c1e30b902a4d411e623
MD5 f863850d4fd0aa77dc765b25b0951e0d
BLAKE2b-256 4d261de6f00a0604c4c5008e7f9e86fd68ddb5b0bbf3de8354c905781eefee27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page