I am very new to Python and have used BeautifulSoup to parse and scrape information from some webpages. Now I need to fill out a form. submit it, and scrape some data after filling in the form, and it seems the easiest way is to use robobrowser.
However, I can't import robobrowser. I have installed robobrowser several different ways and robobrowser is located here:
C:\Users\(USERNAME)\AppData\Local\Programs\Python\Python37-32\Lib\site-packages
Here is my script:
import requests
from bs4 import BeautifulSoup
import datetime
import webbrowser
import re
from robobrowser import RoboBrowser
br = RoboBrowser()
etc....
The problem is the script will not run past "from robobrowser import RoboBrowser" and I get the following message:
ImportError: cannot import name 'RoboBrowser' from 'robobrowser'
Maybe your robobrowser package is corrupted
Now try Installing robobrowser using PyPI
first check if python package named as PyPI is installed on your system using this command in your terminal
pip --version
if it is installed then it will show the output like that
To install robobrowser using PyPI run this command in your terminal
pip install robobrowser
now import it
from robobrowser import RoboBrowser
br = RoboBrowser()