lyyka / google-maps-businesses-scraper

Built with Python running Selenium, this app allows you to scrape places info from the google maps search results
MIT License
62 stars 25 forks source link

How do I run these codes in Jupyter Notebook? #10

Open cen6wkf opened 1 year ago

cen6wkf commented 1 year ago

How do I run these codes in Jupyter Notebook?

cen6wkf commented 1 year ago

I've manage to copy each py file into the same Jupyter Notebook ipykernel file. Instead of using the cliargs.py, I've created a new class "Args" as follow: . class Args: places = (f"Penang Kopitiam Kafe Cafe") query = "" pages = 10 scrape_website = 1 verbose = 0 . And I use the above Args as my scrape argument: . if name == "main": args = Args() scrape(args) . It works well. But after I run it, and I open the excel workbook, the workbook only shows the column title. No data elements were added. How shall I do it now?