LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2006, 08:35 AM   #1
Caesar Tjalbo
Member
 
Registered: Aug 2006
Location: Ņuņoa
Distribution: KaOS
Posts: 94

Rep: Reputation: 16
Question Programming Rapidshare


What I want: connect to my Rapidshare Premium page from my own application, written in Python.

Problem: how to pass username + password when requesting the page (https://ssl.rapidshare.de/cgi-bin/premiumzone.cgi)

I use the password manager in Firefox, so when I open the Rapidshare page, I get taken to the Premium section straightaway because FF fills in my credentials.
I want to write a screenscraper in Python (and perhaps my own uploadmanager, later) to read my own Premium page.
I can connect to RS using sgmllib.SGMLParser and urllib.urlopen, it let's me scrape my screen beautifully, except it's the login page, not the Premium section.

Can anyone explain to me how to send my credentials/authentication when requesting the url?



(note: I have a (paid for) Premium account, I don't intend to do any hacking beyond reading my own uploads.)
 
Old 11-27-2006, 01:43 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
If Rapidshare has an XML RPC programming interface, then you can probably use that to pass remote procedure calls to the server from your client.

Unless the server-side app has "exposed" its functionality though an interface like XML-RPC, I don't see any easy way to achieve this.
 
Old 11-27-2006, 07:20 AM   #3
Caesar Tjalbo
Member
 
Registered: Aug 2006
Location: Ņuņoa
Distribution: KaOS
Posts: 94

Original Poster
Rep: Reputation: 16
Thx for your response.
Quote:
Originally Posted by harishankar
If Rapidshare has an XML RPC programming interface, then you can probably use that to pass remote procedure calls to the server from your client.

Unless the server-side app has "exposed" its functionality though an interface like XML-RPC, I don't see any easy way to achieve this.
I think the RS server has this exposed, they offer a tool called Rapidget which has functions like a down- and uploadqueue and a linkchecker, not sure though.

Firefox however seems to have a generic way to pass username/password to a login screen before requesting the page.

I'm new to the subject, the idea I've got is:
- request page
- walk through page looking for 'input'
- add 'value="<user>"' and 'value="<password>"' to code in the appropriate inputs
- send the page to the server

I doubt whether that's the way though, and then I don't know how to do it.
A better way seems to me (except I can't get it to work in code, it _does_ in a browser)
Code:
f = urllib.urlopen('https://username:password@ssl.rapidshare.de/cgi-bin/premiumzone.cgi')
It might be a limitation of the library used (urllib or urllib2).

I'm open for suggestions and will continue experimenting in the meantime.
Might ask this question on a Mozilla forum too.
 
  


Reply



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
Rapidshare Premium Account ajkannan83 General 2 04-27-2006 07:11 AM
Difference between Top Down programming & Bottom up programming minil Programming 1 06-17-2005 02:42 AM
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 04:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:30 AM.

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
Open Source Consulting | Domain Registration