DEV Community

Cover image for Blog Automation using Python🐍& Blogger
John Pinto
John Pinto

Posted on

Blog Automation using Python🐍& Blogger

I was wondering what are the things I could automate with python.

I know A LOT! 😝😝

🧐 How about movies??

I had nothing specific in mind, but I know I could build something.

We all use Wikipedia a lot for many topics and movies being one of them , an idea clicked.

I'd like reading movie plots alot why not scrape the Plot section of the movie articles and build a website to read only movie plots??

Felt like doing something creative is a good exercise, but what movies??

With the Wikipedia a part already figured out, luckily I discovered python package for IMDb. So there is a module to fetch top200 movies list from IMDb using python.

Now

  • wikipedia(data scraping, python package, api)
  • imdb(python package) What about the website??

I'm not gonna spend $$$ for my side-project that much, instead decided to use bloggerAPI service, which allows use to create free blog websites with Google.

I can create a blogger website with a click and use it's API to upload posts.

🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞🎞

Workflow

It's very simple:

  • Fetch top200 movie title list

  • For each movie title, check if the title has topic "movie"

  • If yes, get the article(url+python) from wikipedia, and scrape the data between Plot section and the Cast section. I said between Plot and cast since the html structure of Wikipedia articles makes it difficult scrape the particular section but, since all the movies articles almost follow the same pattern, that is the decision I made.

  • Finally, bloggerAPI. Nothing special here:

    • Create a project in the Google API Console
    • Enable the Blogger API for your project
    • Create an API key and OAuth 2.0 Client ID

That's it! Run the script which will take care of the rest.

The Blogger Website : https://movieplotzz.blogspot.com/

Here is the github : https://github.com/pj8912/wiki-blog-automation clone it and follow the instructions to automate the process of creating your own movie plots website and have fun! πŸ˜‰

Image of Timescale

πŸš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsβ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay