Giter Club home page Giter Club logo

show-down's Introduction

show-down

Join the chat at https://gitter.im/MayankPratap/show-down

A simple script to download latest episode of any TV show by simply typing a show name.

Supported in Python3 only.

  • Dependencies

    • beautifulsoup4 module of python :- Install it using command pip install beautifulsoup4 in terminal.
  • Download ZIP file of repository or Clone the repository.

  • If using for first time and your system is in proxy network then

    • Use python episode.py -p http://username:password@proxy_address:port

    • You can choose to change proxy anytime

    • You can unset proxy by command python episode.py -u

  • For Downloading

    • Use python episode.py -dl show_name

    • Download format is .mp4

  • To get list of all available shows in mp4 quality.

    • Use python episode.py -l
  • For Help

    • Type python episode.py -h
  • Those who want to schedule their downloader to run weekly and check for latest episode of TV Series you entered :-

    • For Ubuntu and other Linux versions

      • Open Terminal, type crontab -e

      • Add this at end of file :- @weekly DISPLAY=:0 xterm -e python2 /path/to/my/episode.py

        For example :- @weekly DISPLAY=:0 xterm -e python2 /opt/lampp/htdocs/show-down/episode.py

      • Save changes in crontab -e and exit.

  • Testing Travis CI

show-down's People

Contributors

alphaguy4 avatar gitter-badger avatar mayankpratap avatar npcoder2k14 avatar pbaisla avatar pdoongarwal avatar praran26 avatar rnavagamuwa avatar sunil-sangwan avatar yashvsingh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

show-down's Issues

Bad Interpreter Error

I downloaded the script and made it executable. On executing the script ./showDown.py, I got the following error message:

    -bash: ./showDown.py: /usr/bin/python^M: bad interpreter: No such file or directory

Please see to it.

Progress Bar

We need a progress bar, rather than just showing the percentage.

List of improvements

  • Speed. We are doing calculation while writing in the file, this will decrease the speed, we can use asynchronus call, (multiprocessing )
  • Not flushing the data chunk
  • Argparser
  • Downloader section of code is poor in terms of redability
  • Relablling of test.py

Ping @npcoder2k14 @MayankPratap @shark-s

Automated Test

Write a test script to check the program. Use it add continuous integration using TravisCI. Add test coverage from coverage.io. That way you won't commit buggy codes ever.

Make the script portable

Your shebang line reads #!/usr/bin/python. What if I have python installed at #!/usr/local/bin/python instead? See this

Read the `proxy.config` file conditionally

I am not behind a proxy. So, I don't have a proxy.config file. Neither I want to have one. You are trying to open the proxy config file unconditionally. May be you should ask the user if he is behind proxy and only then try to read the file.

Taking CL Arguments

@npcoder2k14 @MayankPratap Currently we are taking commands and arguments by input() . Rather than creating are own CLI, we can use any of python features/libraries to take CL arguments.

Click
This python library caught me eye, we can look into it.

Can't download

Any response I give to Do you wanna download it (y or n) causes it to crash.

##############################################################################
 SOFTWARE_NAME ver 1.0 
##############################################################################

>> download -m sherlock -latest
Sending request ... 
/usr/lib/python2.7/site-packages/bs4/__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "html.parser")

  markup_type=markup_type))
The file in latest available is : Sherlock - The Abominable Bride (TvShows4Mobile.Com).mp4
('>> Do you wanna download it (y or n):',)
 y
Traceback (most recent call last):
  File "test.py", line 48, in <module>
    main()
  File "test.py", line 41, in main
    user.downloadLatest(options['m'] , "mp4" )
  File "/home/prashant/github/show-down/showDown.py", line 52, in downloadLatest
    response = input(" ")
  File "<string>", line 1, in <module>
NameError: name 'y' is not defined

following erroe occurede while running

I M USING UBUNTU

Traceback (most recent call last):
File "episode.py", line 1, in
from showDown import showDown
File "/home/rishabh/github/show-down/showDown/showDown.py", line 27
"""
^
IndentationError: expected an indented block

Display a warning about proxy

Currently your script is configured you use MNNIT proxy server addresses only. It would be good if you displayed a warning at the start of the script. Something like this: "WARNING: If you are behind proxy, this script might not work for you. Currently, only MNNIT proxy server IPs are supported. Would you like to continue (y/n)?"

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.