sjrusso8 / pga-scraper Goto Github PK
View Code? Open in Web Editor NEW๐ Scrapy crawler for the PGA 2020 stats
๐ Scrapy crawler for the PGA 2020 stats
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(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.