pgh-public-meetings / city-scrapers-pitt

Pittsburgh City Scrapers: sourcing public meetings in Pittsburgh
https://pgh-public-meetings.github.io/events/
MIT License
19 stars 66 forks source link

Create scraper for Allegheny County Redevelopment Authority #62

Closed richiebful closed 3 years ago

richiebful commented 4 years ago

This meetings webpage is extremely simple, just a list of dates and an address at the top. The scraper is similarly straightforward.

bonfirefan commented 4 years ago

A reminder to sync this with the upstream fork so that Travis tests will past! Also, to enable edits from maintainers!

Enable edits from maintainers!:

In the the right sidebar of your pull request, select Allow edits from maintainers. You can change these permissions at any time by unselecting this option.

Syncing your fork:

git remote add upstream https://github.com/bonfirefan/city-scrapers-pitt.git
git fetch upstream
git merge upstream/master
ben-nathanson commented 4 years ago

The current page hasn't been updated to 2020 yet. I'm having some trouble getting this scraper to find the events for 2019 though, which I assumed it would. Here is my terminal session. Any ideas as to what might be happening?

(city-scrapers-pitt) >scrapy crawl alle_redevelopment_authority -o e.json 
2020-01-17 14:47:30 [scrapy.utils.log] INFO: Scrapy 1.8.0 started (bot: city_scrapers)
2020-01-17 14:47:30 [scrapy.utils.log] INFO: Versions: lxml 4.4.2.0, libxml2 2.9.10, cssselect 1.1.0, parsel 1.5.2, w3lib 1.21.0, Twisted 19.10.0, Python 3.7.5 (default, Nov 13 2019, 13:25:19) - [Clang 11.0.0 (clang-1100.0.33.12)], pyOpenSSL 19.1.0 (OpenSSL 1.1.1d  10 Sep 2019), cryptography 2.8, Platform Darwin-19.2.0-x86_64-i386-64bit
2020-01-17 14:47:30 [scrapy.crawler] INFO: Overridden settings: {'BOT_NAME': 'city_scrapers', 'CLOSESPIDER_ERRORCOUNT': 5, 'COMMANDS_MODULE': 'city_scrapers_core.commands', 'COOKIES_ENABLED': False, 'FEED_FORMAT': 'json', 'FEED_URI': 'e.json', 'NEWSPIDER_MODULE': 'city_scrapers.spiders', 'ROBOTSTXT_OBEY': True, 'SPIDER_MODULES': ['city_scrapers.spiders'], 'USER_AGENT': 'City Scrapers [development mode]. Learn more and say hello at https://www.citybureau.org/city-scrapers/'}
2020-01-17 14:47:30 [scrapy.extensions.telnet] INFO: Telnet Password: 1623ca4422127bfc
2020-01-17 14:47:30 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
 'scrapy.extensions.telnet.TelnetConsole',
 'scrapy.extensions.memusage.MemoryUsage',
 'scrapy.extensions.feedexport.FeedExporter',
 'scrapy.extensions.logstats.LogStats']
2020-01-17 14:47:31 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
 'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
 'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
 'scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware',
 'scrapy.downloadermiddlewares.retry.RetryMiddleware',
 'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
 'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
 'scrapy.downloadermiddlewares.stats.DownloaderStats']
2020-01-17 14:47:31 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
 'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
 'scrapy.spidermiddlewares.referer.RefererMiddleware',
 'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
 'scrapy.spidermiddlewares.depth.DepthMiddleware']
2020-01-17 14:47:31 [scrapy.middleware] INFO: Enabled item pipelines:
['city_scrapers_core.pipelines.DefaultValuesPipeline',
 'city_scrapers_core.pipelines.MeetingPipeline']
2020-01-17 14:47:31 [scrapy.core.engine] INFO: Spider opened
2020-01-17 14:47:31 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2020-01-17 14:47:31 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2020-01-17 14:47:31 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.alleghenycounty.us/robots.txt> (referer: None)
2020-01-17 14:47:31 [scrapy.downloadermiddlewares.redirect] DEBUG: Redirecting (302) to <GET https://www.alleghenycounty.us/404.html?aspxerrorpath=/economic-development/%20%20%20%20%20%20%20%20authorities/meetings-reports/raac/meetings.aspx> from <GET https://www.alleghenycounty.us/economic-development/%20%20%20%20%20%20%20%20authorities/meetings-reports/raac/meetings.aspx>
2020-01-17 14:47:31 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.alleghenycounty.us/404.html?aspxerrorpath=/economic-development/%20%20%20%20%20%20%20%20authorities/meetings-reports/raac/meetings.aspx> (referer: None)
2020-01-17 14:47:31 [scrapy.core.engine] INFO: Closing spider (finished)
2020-01-17 14:47:31 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 1088,
 'downloader/request_count': 3,
 'downloader/request_method_count/GET': 3,
 'downloader/response_bytes': 3109,
 'downloader/response_count': 3,
 'downloader/response_status_count/200': 2,
 'downloader/response_status_count/302': 1,
 'elapsed_time_seconds': 0.343289,
 'finish_reason': 'finished',
 'finish_time': datetime.datetime(2020, 1, 17, 19, 47, 31, 390422),
 'log_count/DEBUG': 3,
 'log_count/INFO': 10,
 'memusage/max': 59547648,
 'memusage/startup': 59547648,
 'response_received_count': 2,
 'robotstxt/request_count': 1,
 'robotstxt/response_count': 1,
 'robotstxt/response_status_count/200': 1,
 'scheduler/dequeued': 2,
 'scheduler/dequeued/memory': 2,
 'scheduler/enqueued': 2,
 'scheduler/enqueued/memory': 2,
 'start_time': datetime.datetime(2020, 1, 17, 19, 47, 31, 47133)}
2020-01-17 14:47:31 [scrapy.core.engine] INFO: Spider closed (finished)

Also the city_scrapers/spiders directory lists "alle_redevelopment_authority.py" and "alle_redevelopment_authority.py~" - did you mean to remove the second file?

Thanks! --Ben

bonfirefan commented 3 years ago

Hey there - try syncing your updates to latest with

git fetch upstream
git merge upstream/master

and delete the travis file. You may have some pipfile and pipfile lock conflicts - try to keep the changes from upstream with git checkout --theirs -- <filename> on any merge conflicts.

ben-nathanson commented 3 years ago

Closing as inactive.