Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File pointers
#1
Good morning. I am getting an error telling me BeautifulSoup isn't installed. Yet, I've installed it several times. I'm stuck.

import bs4 BeautifulSoup
import re

WOGCC_API{49005244950000,
49005245000000,
49005245070000,
49005245070001,
49005245170000,
49005245210000,
49005245240000,
49005245250000,
49005245260000,
49005245270000,
49005245410000,
49005245420000,
49005245430000,
49005245470000,
49005245510000,
49005245570000,
49005245580000,
49005245620000,
49005245640000,
49005245650000,
49005245680000,
49005245700000,
49005245710000,
49005245750000,
49005245760000
}

def WOGCC_Scraper():
    API = 0

    while API > 0:

        WOGCC_API_FETCH = pipeling.wyo.gov/Entryapi.cfm?oops2=1 +str[WOGCC_API]{API}[3:10]
Error:
C:\Python365\python.exe C:/Automate_the_Boring_Stuff/Chapter_11_-_Web_Scraping/WOGCCCompletionsTJNStyle10182018.py File "C:/Automate_the_Boring_Stuff/Chapter_11_-_Web_Scraping/WOGCCCompletionsTJNStyle10182018.py", line 1 import bs4 BeautifulSoup ^ SyntaxError: invalid syntax Process finished with exit code 1
As always - I appreciate any help you can provide.
Reply
#2
probably you want from bs4 import BeautifulSoup

I don't know what you want to do with
WOGCC_API{49005244950000,
49005245000000,
49005245070000,
49005245070001,
49005245170000,
49005245210000,
49005245240000,
49005245250000,
49005245260000,
49005245270000,
49005245410000,
49005245420000,
49005245430000,
49005245470000,
49005245510000,
49005245570000,
49005245580000,
49005245620000,
49005245640000,
49005245650000,
49005245680000,
49005245700000,
49005245710000,
49005245750000,
49005245760000
}
assign dict to WOGCC_API? you need =
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Ok perfect! That worked! Thank you for your help!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Need Pointers/Advise for Cleaning up BS4 XPATH Data BrandonKastning 0 1,228 Mar-08-2022, 12:28 PM
Last Post: BrandonKastning

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020