kaustubhhiware / rose Goto Github PK
View Code? Open in Web Editor NEWAnalyse all kinds of data for a TV series
Home Page: https://rose-tv.herokuapp.com
License: MIT License
Analyse all kinds of data for a TV series
Home Page: https://rose-tv.herokuapp.com
License: MIT License
Once the webapp is completed, and a plot is visualised for any show, we should have a bar / input field that takes an imdb rating for instance, and highlights the episodes with rating higher than the specified value.
Could proceed with displaying the plot first, and then highlighting the bars where value >= specified. Visualization to be discussed before sending PR.
Pointed out by Shalini Mukhopadhyay
Well one can also ask about the star cast of a show so why not modify the code a little bit to get the details.
Currently, we only have a script that runs on your system. It would be great if the implementation could be shifted to a webapp, based on flask or any light weight framework.
This is of highest priority.
Related to #3.
Say, you're watching an episode on VLC or some video player. The work here, would be a new script, call it rose_listen.py
.
This is possible via playerctl in linux. Let's focus on VLC for the time-being, due to its simplicity.
Here's a sample output
> playerctl metadata # when video is playing
{'mpris:trackid': <objectpath '/org/videolan/vlc/playlist/4'>, 'xesam:url': <'file:///run/media/kaustubh/Windows/Music/FILE_NAME.mp4'>, 'vlc:time': <uint32 202>, 'mpris:length': <int64 202896000>, 'vlc:length': <int64 202896>, 'vlc:publisher': <5>}
> playerctl metadata xesam:url
file:///run/media/kaustubh/Windows/Music/FILE_NAME.mp4
Assume the file name has Show title, and "S05E12" somewhere present. Assume simplest case for initial development.
What information should be fetched?
Quotes fetching not a priority.
It should be possible to fetch information for only one episode. That is, add functionality for another parameter, call it -e
or --episode
which allows to fetch information for that particular episode only.
Usage: python scrape_views.py -s 'Two and a half men' -e 'S03E02'
If the contributor wants, they could also handle this case (not a priority) :
python scrape_views.py -e -s 'Two and a half men S03E02'
The expected output is IMDB rating, US views if available and a link to the episode.
Pointed out by Shalini Mukhopadhyay
As pointed out by @Harsh5557, as of Dec 12 2018, the wiki flag is broken. This is probably due to a change in formatting on wikipedia's side, and needs to be fixed urgently.
This is a high priority issue. This is relatively easy, the variables need to be printed out and seems to be a 2-3 hour task once an understanding of the code and wikipedia's relevant page is obtained.
Recreation:
$ python scrape_views.py -w -a -s "Two and a half men"
Detected wiki link: https://en.wikipedia.org/wiki/List_of_Two_and_a_Half_Men_episodes
Number of seasons 12
Season 1
Episode 1
Traceback (most recent call last):
File "/home/kaustubh/GitHub/rose/scrape_views.py", line 302, in <module>
views, average = wikiscrape(wikiurl)
File "/home/kaustubh/GitHub/rose/scrape_views.py", line 87, in wikiscrape
numviews = float(filter(None, re.findall(floating_point, views))[0])
TypeError: 'filter' object is not subscriptable
Work to start after #7.
Operates in the umbrella of rose_listen.py --subs
This would provide user with two functionalities:
i) Downloading the subtitles of currently playing episode, and saves it in current location.
python rose_listen.py --subs --dl
ii) Displays in a terminal, appending as the time goes on, like a running commentory.
python rose_listen.py --subs
Say the script is started when 5 minutes of the episode has elapsed. The displayed subtitles should be synced in accordance with the video. This means time and speed both (If the video is being played at 1.5x, the subtitles should also be displayed at 1.5x).
iii) Language. Since we would already be fetching the subtitles, why not fetch it in the language the user wants? This would be a great tool for people wanting to learn other languages.
python rose_listen.py --subs --lang en
en would correspond to default English, if --lang
is not provided, it's something the script should handle on its own. Language codes can be found here.
get_link
gets the url (www.imdb.com/title/tt5498940/) instead of (www.imdb.com/title/tt1632701/)
Can we add functionality such that both we can run something like
python3 scrape_views.py -i -a -b suits
as a first time user that was my first command and I think many people would prefer to have both functionalities in the same command, right now after executing this command, the program gave the result of -b
and became irresponsive afterward.
Pointed out in #18
Currently, rose_listen.py assumes the file names for currently playing episode to be simple.
Need to extend to cover atleast the following cases:
One can fetch a quick plot summary of the interested show/seasons of a show.
num_seasons is directly being used as the count of season numbers but some cases it fails (Example - friends)
There are even some other issues when there are some other tables in between (apart from seasons table)
To avoid problems like #15 with new contributors, I think we should add a contributors md or add something to the readme or maybe add a pull request template
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.