Git Product home page Git Product logo

gmaps_popular_times_scraper's Introduction

gmaps_popular_times_scraper's People

Contributors

metebalci avatar philshem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmaps_popular_times_scraper's Issues

Accept EITHER a CSV path OR a single URL

currently the code requires a path to a CSV file, with the first column containing a gmaps URL

Would be cool to smarten it up a bit, and let the user point to EITHER a CSV path, OR a single gmaps URL. This way you could loop over variables in a batch script, which could be fed dynamically.

datatype error

I'm using Linux Mint. When I run the script using a single URL I get a datatype error:

`/home/elena/Scrivania/places scraper/gmaps_popular_times_scraper/scrape_gm.py:35: DtypeWarning: Columns (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38) have mixed types. Specify dtype option on import or set low_memory=False.
urls = pd.read_csv(sys.argv[1])
ERROR: (a=window.gtbExternal.pageT()) 20231028_195921
ERROR: if (window['wtf']&& window['wtf']['trace']&& 20231028_195921
ERROR: window['wtf']['trace']['timeStamp']){window['wtf']['trace']['timeStamp']('application.' + t);} 20231028_195921
ERROR: } 20231028_195921

.. etc...
`

When I run the script using the CSV file, my output gives a generic error:
ERROR: https://maps.app.goo.gl/X7J2w3QXUXssXXzb9 20231028_200733

I've tried several solutions but I can't seem to fix the problem. Any suggestions?

Speed up wait time

I have currently a 30 second sleep period to make sure the page and data is rendered. This is to avoid missing data. Better code would be starting with 5 seconds and then doing a while loop with increasing sleep, until 60 seconds or so.

This would help the overall performance of the code over many places. (It’s important to collect data from each place at least 1x per hour)

Containerize

Because it’s not trivial to get running, would be cool to put this out as a docket image, or at least a docket build script. I know there are some python-selenium images that may be built on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.