Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 0
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
New to this Portal?
Click on Join Now to Sign Up
Join Now
Help
Feedback
Sign In
Processing Forum
Recent Topics
All Forums
Search All
Tags
Author
Advanced Search
Search
New Topic
Screen name:
leentu
leentu's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Gmail inbox feed XML parsing
[4Replies]
10-Jul-2012 12:49 AM
Forum:
Contributed Library Questions
Hi!
I'm trying to write a parser that would take information from the Gmail inbox feed.
The problem that i have, I think, is associated with authentication and SSL-encryption.
I tried to get information using XML queries (from Daniel Shiffman's SimpleML library), and using loadStrings() function. The result is the same — if the URL is
https://mail.google.com/mail/feed/atom
— I get a 401 error (which is expected), but if i enter
https://myaccountname@gmail.com:mypassword@mail.google.com/mail/feed/atom
(which works correctly when i type it directly into browser URL bar) i get
java.net.MalformedURLException: For input string: "password@mail.google.com"
Something's wrong with the URL:
https://account@gmail.com:password@mail.google.com/mail/feed/atom
Here is the code i used:
import simpleML.*;
XMLRequest xmlRequest;
String proto = "https://";
String acc = "myaccounthere@gmail.com";
String pass = "mypasswordhere";
String server = "mail.google.com";
String path = "/mail/feed/atom";
void setup() {
size(200, 200);
// Creating and starting the request
xmlRequest = new XMLRequest(this, proto + acc + ":" + pass + "@" + server + path);
xmlRequest.makeRequest();
}
void draw() {
background(0);
}
// When the request is complete
void netEvent(XMLRequest ml) {
// Retrieving an array of all XML elements inside "<fullcount>" tags
String[] counts = ml.getElementArray("fullcount");
for (int i = 0; i < counts.length; i++) {
println(counts[i]);
}
}
Сode works fine for everything except Gmail :<
I'll be very grateful if someone can help with some idea.
«Prev
Next »
Moderate user : leentu
Forum