Comments (4)
I think I'm seeing something similar... the XML response I'm getting is this:
<rsp stat="ok">
<comments photo_id="3631910794">
<comment id="1137410-3631910794-72157619728434981" author="7762180@N05" authorname="mackenziegood" datecreate="1245138850" permalink="http://www.flickr.com/photos/leannerexia/3631910794/#comment72157619728434981">
Comment text
</comment>
</comments>
</rsp>
And here is the result I get from HTTParty:
{"rsp"=>{"comments"=>{"photo_id"=>"3631910794", "comment"=>"Comment text"}, "stat"=>"ok"}}
So I'm getting the comment text, but losing all the attributes.
from httparty.
i have the exact same problem, as explained here
from httparty.
Looks like this issue has already been addressed in version 0.1.3 of crack (the thing that parses the xml for httparty). In the example set forth by jduff you would extract the first poster elements attributes with something like this: httparty_result_hash[ 'poster' ][ 0 ].attributes.
from httparty.
Closing
from httparty.
Related Issues (20)
- Configured timeout is duplicated HOT 4
- Question: Formatting an array of objects for multipart form-data
- Add application/problem+json to the supported formats HOT 1
- HTTParty response cache is broken HOT 1
- Is there a place to report security issues? HOT 1
- HTTParty.post is unusable HOT 12
- Bug in post function HOT 1
- HTTParty response body returning compressed GZipped data HOT 1
- Segmentation fault in request HOT 1
- Bundling Httparty results in ArgumentError: bad argument (expected URI object or URI string) HOT 1
- OpenSSL::SSL::SSLError HOT 2
- Is GHSA-5pq7-52mg-hr42 remotely exploitable?
- Adding Response Code Helper Methods like _401? HOT 2
- Add party foul mode HOT 1
- socks proxy only for special https links
- Preventing large payloads? HOT 3
- csv was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0 HOT 7
- Doc request: please explain which changes in 0.22 are breaking changes HOT 4
- Unable to install (older) version of httparty because of dependencies HOT 3
- [debug_output]: Remove the section that reads bytes, or specify the length of bytes to display in the console!! 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 httparty.