Comments (3)
Nice research and write-up. It looks like for the most part, characters outside the standard alpha-numerics don't yield any good search results anymore. (They used to before Kickstarter switched to Elasticsearch).
I put that test in there just to make sure we didn't screw things up with the way we escaped or encoded the characters, but honestly at this point it seems like more of a hassle than it's worth to support a wide set of punctuation or diacritics.
If you want to still keep working on it, by all means, go for it. But if your enthusiasm is waning, I think it's probably ok to get rid of that test.
from kickscraper.
I issued a pull request, with a couple of revised test and one left pending.
The problem has been noticed when a search including the ligature ae is done.
If lines 14-16 and 19-23 in the code below are commented out, then line 24 executes fine.
However, if either is left uncommented, then line 24 fails with
ArgumentError: invalid byte sequence in US-ASCII
(Absent the print statements, somewhere else in the routine will fail with the same error on a search including ae)
I've tried there various solutions of exporting environment variables and putting encoding lines at the tops of files that searches for the error message bring up, but none make the problem disappear.
cat -n ./lib/kickscraper/connection.rb
10 def call(env)
11 puts "ZZZ #{env[:url].request_uri()}"
12 # replace '+' symbols in the query params with their original spaces, because there
13 # seems to be a bug in the way some versions of Fararay escape parameters with spaces
14 # env[:url].query_params.each { |key, value|
15 # env[:url].query_params[key] = value.tr('+', ' ')
16 # }
17
18 # add format=json to all public search requests, or add the oauth_token to all api requests once we have it
19 # if env[:url].host.index('https://api.kickstarter.com').nil?
20 # env[:url].query_params['format'] = 'json'
21 # else
22 # env[:url].query_params['oauth_token'] = Kickscraper.token unless Kickscraper.token.nil?
23 # end
24 puts "ZZZ #{env[:url].request_uri()}"
25
26 # make the call
27 @app.call(env)
28 end
29 end
from kickscraper.
Interesting... it seems like the issue might be related to the internal processing inside the Faraday code... that's just a speculation, but either way, I think leaving that test pending is fine. Thanks for working on this. I'll merge the pull request in a moment.
from kickscraper.
Related Issues (20)
- Issue with Faraday dependency HOT 3
- Pulling the company website for each project HOT 2
- Scraping all the successfully funded projects on kickstarter HOT 39
- Kickstart login failing? HOT 5
- Is Kickstarter denying API access? HOT 3
- Fetch all projects on kickstarter HOT 1
- Client returning null objects HOT 1
- how to use find_project to find a specify project? HOT 4
- Kickstarter csv HOT 56
- Finding website of users? HOT 1
- Rate Limits? HOT 2
- Kickstarter limits recently launched to 200 pages HOT 3
- Fetch projects after 2014? HOT 1
- Get categories get: "You are not authorized to access this resource." HOT 1
- Violation of Kickstarter's terms of use??? HOT 1
- backed_projects returning nil HOT 2
- how to scrape data about the project creators? HOT 1
- in `parse': 765: unexpected token HOT 1
- Faraday::Error::ConnectionFailed HOT 7
- Captcha Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kickscraper.