======
PYTOMO
======

Pytomo is a YouTube crawler designed to figure out network information out of
YouTube video download.

Usage
-----
pytomo [-r max_rounds] [-u max_crawled_url] [-p max_per_url] 
[-P max_per_page] [-t time_frame] [-n ping_packets] [-D download_time] 
[-B buffering_video_duration] [-M min_playout_buffer_size] [-L log_level]::

    Options:
      -h, --help            show this help message and exit
      -r MAX_ROUNDS         Max number of rounds to perform (default 50)
      -u MAX_CRAWLED_URL    Max number of urls to visit (default 10000)
      -p MAX_PER_URL        Max number of related urls from each page (default 2)
      -P MAX_PER_PAGE       Max number of related videos from each page (default
                            30)
      -t TIME_FRAME         Timeframe for the most popular videos to fetch at
                            start of crawl put 'today', 'week', 'month' or
                            'all_time' (default 'week')
      -n PING_PACKETS       Number of packets to be sent for each ping (default 3)
      -D DOWNLOAD_TIME      Download time for the video (default 30.000000)
      -B BUFFERING_VIDEO_DURATION
                            Buffering video duration (default 3.000000)
      -M MIN_PLAYOUT_BUFFER_SIZE
                            Minimum Playout Buffer Size (default 1.000000)
      -L LOG_LEVEL          The log level setting for the Logging module.Choose
                            from: 'DEBUG', 'INFO', 'WARNING', 'ERROR' and
                            'CRITICAL' (default 'DEBUG')
      --http-proxy=PROXIES  in case of http proxy to reach Internet (default None)

Installation-free
-----------------
In order to provide installation-free package, we provide binary executables
for Linux (32 and 64bits), Windows, and Mac OS X.
The binaries files were generated with Pyinstaller_ (version 1.5RC1).

If you have Python installed, you can directly run the start_crawl.py script at
root or the pytomo script in bin directory.

External Resources
------------------
We based the lib_youtube_download on `YouTube Download`_ script: we simplified
it at most and include only the classes we needed (and only YouTube video
retrieval).

The dns module is taken from the `DNS Python Package`_: we just modified rdata
so that Pyinstaller_ include all needed modules.

The extraction of metadata out of video files is an adaptation of `Kaa Metadata
Python Package`_: it has been modified in order to be independent of Kaa-base
(thus pure Python and portable).

External Links
~~~~~~~~~~~~~~

1. `YouTube Download`_.
2. `Kaa Metadata Python Package`_.
3. `DNS Python Package`_
4. Pyinstaller_

.. _YouTube Download: http://rg3.github.com/youtube-dl/
.. _Kaa Metadata Python Package: http://packages.debian.org/sid/python-kaa-metadata
.. _DNS Python Package: http://pypi.python.org/pypi/dnspython
.. _Pyinstaller: http://www.pyinstaller.org/
