Automate Your Blog Writting With Python Bot | codewitham

Automate Your Blog Writting With Python Bot | codewitham

Share It With Your Firends:

Python is a powerful language using which you can automate pretty much every mundane or complex task with some effort. All you need to get started is Python installed on your machine and the appropriate libraries installed on your computer.

Automation is a term for technology applications where human input is minimized. This includes business process automation (BPA), IT automation, personal applications such as home automation and more. A rich library of useful packages and ready-to-use ingredients for automation greatly facilitates testing in Python. Python is object-oriented and functional. It allows choosing what suits your tasks better – functions or classes. Distributed functions don’t have side effects, and simple syntax makes them readable.

Installation Of Python Package

import webbrowser
import pyautogui
import wikipedia
import pywikihow
import time

Make Sure To Follow These Steps

site = "yoursitename/create-post"
  1. Now We Are Going to use the best library for automation. We are going to use pyautogui to automate our blog writting.
  2. For Content Generation we are going to use wikipedia library.
  3. You need to run your script and within delay time you need to open your site.
  4. Make sure you have opened your write blogpost section. And You need to click on the add content or write content body section.
  5. Pywikihow is an optional package. After You have been written your blog you can use pywikihow script as metion below.
def Bot():
    query1 = str(input("Enter Topic for summery: "))
    query2 = str(input("Enter Topic for How To: "))
    try:
        site = "sitename/create-post"
        webbrowser.open(site)

        if "none" in query2:
            results = wikipedia.summary(query1, sentences = 100)
            time.sleep(10)
            pyautogui.write(results)

        elif "none" in query1:
            how_to = pywikihow.search_wikihow(query2, 1)
            time.sleep(10)
            pyautogui.write(how_to[0].summary)

        else:
            results1 = wikipedia.summary(query1, sentences = 100)
            time.sleep(10)
            how_to = pywikihow.search_wikihow(query2, 1)
            time.sleep(10)
            pyautogui.write(results1 + how_to[0].summary)
    except Exception as e:
        print("Some error occurred", e)

Bot()

Share It With Your Friends

1 Comment

Leave a Reply

Recent Posts

  • All Post
  • A.I.
  • AI
  • c
  • c++
  • computer
  • cryptocurrency
  • database
  • digital marketing
  • finance
  • hacking
  • HTML
  • java
  • Marketing
  • network
  • other
  • programming
  • python
  • react
  • social
  • Tools
  • Uncategorized
  • web devlopment
    •   Back
    • drawing In Python
DIY AI Voice Assistant In Python

September 8, 2023

Build your own AI assistant with Python! Learn to recognize voice commands, generate responses, and more. Create your virtual companion…

share it

Recent Posts

  • All Post
  • A.I.
  • AI
  • c
  • c++
  • computer
  • cryptocurrency
  • database
  • digital marketing
  • finance
  • hacking
  • HTML
  • java
  • Marketing
  • network
  • other
  • programming
  • python
  • react
  • social
  • Tools
  • Uncategorized
  • web devlopment
    •   Back
    • drawing In Python

Additional Content

CodeWithAM

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus luctus.

Products

Automated Chatbot

Data Security

Virtual Reality

Communication

Support

Services

FAQ's

Privacy Policy

Terms & Condition

Team

Contact Us

Company

About Us

Services

Features

Our Pricing

Latest News

© 2023 Codewitham