LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2016, 01:56 PM   #1
Utarg
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Rep: Reputation: Disabled
Download page from a google account


Hi,

I've been trying to download a text or html file from a google account. I've tried it with Lynx but it always redirects me to the login page. Same thing with wget, I'm running the below to download my gmail inbox:

wget --user=MY.USEr@gmail.com --password=PASSWD --no-check-certificate "https://mail.google.com/mail/u/0/#inbox

but it's the same story, I get stuck at the login page. I'm clearly doing something wrong, any help on this?
 
Old 07-11-2016, 04:53 PM   #2
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia Cauldron - Debian Testing - Salix OS
Posts: 1,051
Blog Entries: 5

Rep: Reputation: 165Reputation: 165
I don't know anything about the way you're doing it. I've never tried it that way. But, can the files be put on a shared Google Drive? That may be how google want's to do it now days! Just a thought!
 
Old 07-12-2016, 02:17 AM   #3
Utarg
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi Fred,

Yes they can be placed in a Google Drive, but I need them in my computer to manipulate them with my scripts. I know wget and even lynx can be used to download html pages, even the ones which require authentication, but I can't seem to find the way to download the ones from Google.
 
Old 07-12-2016, 06:31 AM   #4
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,031

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
#inbox is not a file. With wget you must specify a file. #inbox is PHP or something like that. You can sometimes look at the page code and see what it points to. Something like index.html. You just need to find the file with the email links in it. Wget will follow all the links in the file specified and download the corresponding files. I hope this helps.
 
Old 07-12-2016, 12:12 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 6,474
Blog Entries: 2

Rep: Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566
Quote:
Originally Posted by Utarg View Post
I've been trying to download a text or html file from a google account. I've tried it with Lynx but it always redirects me to the login page. Same thing with wget, I'm running the below to download my gmail inbox:

wget --user=MY.USEr@gmail.com --password=PASSWD --no-check-certificate "https://mail.google.com/mail/u/0/#inbox

but it's the same story, I get stuck at the login page. I'm clearly doing something wrong, any help on this?
Quote:
Originally Posted by man wget
--password=password
Specify the username user and password password for both FTP and HTTP file retrieval. These parameters can be
overridden using the --ftp-user and --ftp-password options for FTP connections and the --http-user and --http-password
options for HTTP connections.
"password" here is not what you think it is. you cannot log into a google account this way.
why don't you use a mail program like thunderbird for that? google supports that.

also i don't think gmail will let you use a text only browser.
but i could be wrong there.
 
Old 07-12-2016, 01:08 PM   #6
Utarg
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi guys,

Thanks for the replies, I found the way to do it. First by downloading the cookies once you're logged in and then you can use the --load-cookies=/cookies.txt option with wget when requesting any file.
 
Old 07-12-2016, 09:41 PM   #7
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,031

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
What is the filename for #inbox?
 
Old 07-13-2016, 03:14 AM   #8
Utarg
LQ Newbie
 
Registered: Jul 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
https://mail.google.com/mail/feed/atom
 
Old 07-14-2016, 02:14 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 6,474
Blog Entries: 2

Rep: Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566Reputation: 1566
well done Utarg, and thanks for sharing the solution.
others will benefit.
please mark this thread [SOLVED].
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root account can access the internet, the other account can only access google omizt Linux - Newbie 101 02-13-2012 02:22 PM
vsftpd with one account upload only and other account download only ahmadnawaz Linux - Server 2 08-10-2010 11:52 PM
Unable To Download VLC Media Player From Download Page(s) clb48 Linux - Newbie 5 03-15-2010 05:42 PM
Unable To Download VLC Media Player From Download Page(s) clb48 Linux - Newbie 1 03-15-2010 02:46 PM
Reload this Page voicechat support which client?especially google chat(gmail account) deepclutch Linux - Software 2 04-17-2008 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration