3 ms·
Yeah mostly regex. Plus some heuristics. Works most of the times. Pretty efficient for the simple amount of heuristics it uses. You can see the code here https:
by legaloslotr 14y ago
Yeah mostly regex. Plus some heuristics. Works most of the times. Pretty efficient for the simple amount of heuristics it uses.
You can see the code here https://github.com/legalosLOTR/mdb/blob/master/MDB/DBbuilder.py https://github.com/legalosLOTR/mdb/blob/master/MDB/DBbuilder...
Check out the function get_movie_name!
- wingerlang 14y agoWouldnt this break a movie like 2012? #2 remove year and stuff following it filename = re.sub('\d\d\d\d.*', ' ', filename)
- legaloslotr 14y agoYeah it totally would! Thanks for pointing this out. Btw, I am planning to use another library that has better detection rates - https://github.com/wackou/guessit https://github.com/wackou/guessit