Coder Social home page Coder Social logo

nmcassa / letterboxdpy Goto Github PK

View Code? Open in Web Editor NEW
31.0 3.0 12.0 1.86 MB

A letterboxd webscraper

Home Page: https://pypi.org/project/letterboxdpy/

License: MIT License

Python 100.00%
python webscraper letterboxd json library movie movies api

letterboxdpy's People

Contributors

dgw avatar nmcassa avatar pedromdpereira avatar

Stargazers

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

Watchers

 avatar  avatar

letterboxdpy's Issues

Duplicate Movie Titles

Movies that have the same title (arrival (2013), arrival (1980), arrival (2016)) have different url's with the year in the top.
So far no way to specify movie.

Could search the name and pick the most popular.
Could add a constructor that takes a year to get more accurate.

can't find users

Hello, I've used letterboxdpy in the past with no issues at all, but just to gather data about movies.

I'm tying now to do the same with users, but I keep getting the errors ''NoneType object has no attribute 'text'' and then 'No user found', even when using the example provided in the readme.md.

from letterboxdpy import user
nick = user.User("nmcassa")
print(nick)

these are the errors I get:

Screenshot 2023-11-23 155850

Thank you in advance.

If movie title begins with a capital letter, no movie is found

If you begin the movie title with a capital letter, for example:

if __name__ == "__main__":
    king = Movie("King kong")
    print(king)

You get:

...
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/letterboxdpy/movie.py", line 178, in <module>
    king = Movie("King kong")
  File "/opt/homebrew/lib/python3.10/site-packages/letterboxdpy/movie.py", line 25, in __init__
    self.movie_genre(page)
  File "/opt/homebrew/lib/python3.10/site-packages/letterboxdpy/movie.py", line 91, in movie_genre
    raise Exception("No movie found")
Exception: No movie found

To resolve, you could either update the README to reflect this or update https://github.com/nmcassa/letterboxdpy/blob/main/src/letterboxdpy/movie.py#L14 to automatically convert the title to lowercase with:

self.title = title.replace(' ', '-').lower()

Some Movie Data isn't populated

Some meta data for new or very small movies aren't added.
Searching through some movies it looks like they just arent there.

Probably need to add some try catches and just not populate some variables for movies

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.