Giter VIP home page Giter VIP logo

pga-scraper's Introduction

Some Stats

My Github Stats Some Langs

Linkedin

Steve Russo | LinkedIn

pga-scraper's People

Contributors

sjrusso8 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

pga-scraper's Issues

Having issue pulling a 2022 dataset

I have all the dependencies installed via pip3 and have only changed the following line:

            stats_table = link.get()[:-5] + ".y2022.html" # Change this line to a different year to collect different stats. Format y.YYYY.html

and

       PATH = "C:<my absolute path>/pga-scraper/pga_scrapy/output/"

but am running into the following error. How is your project writing to the output directory? Am I missing something here

2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats.html> (referer: None)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.ROTT_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RPUT_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RSCR_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RARG_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RAPP_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RSTR_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/categories.RMNY_INQ.html> (referer: https://www.pgatour.com/stats.html)
2022-05-25 16:24:49 [scrapy.dupefilters] DEBUG: Filtered duplicate request: <GET https://www.pgatour.com/stats/stat.101.y2022.html> - no more duplicates will be shown (see DUPEFILTER_DEBUG to show all duplicates)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02674.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02438.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.213.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02423.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02422.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02421.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.01008.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.pgatour.com/stats/stat.02420.y2022.html> (referer: https://www.pgatour.com/stats/categories.ROTT_INQ.html)
2022-05-25 16:24:50 [scrapy.core.scraper] ERROR: Error processing {}
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/scrapy/utils/defer.py", line 150, in f
    return deferred_from_coro(coro_f(*coro_args, **coro_kwargs))
  File "/Users/diegosierra/Box Sync/SparkPGA/pga-scraper/pga_scrapy/pipelines.py", line 27, in process_item
    df.to_csv(saved_file_name, index=False)
  File "/usr/local/lib/python3.9/site-packages/pandas/core/generic.py", line 3384, in to_csv
    return DataFrameRenderer(formatter).to_csv(
  File "/usr/local/lib/python3.9/site-packages/pandas/io/formats/format.py", line 1083, in to_csv
    csv_formatter.save()
  File "/usr/local/lib/python3.9/site-packages/pandas/io/formats/csvs.py", line 228, in save
    with get_handle(
  File "/usr/local/lib/python3.9/site-packages/pandas/io/common.py", line 639, in get_handle
    handle = open(

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.