Login and upload file at website with python

I'm making a python script that should zip a file and upload it at a site. My problem is I can't figure out how to login into the site to then upload the file in question.

I've searched trough the web but can't make any of the solutions presented online to work, probably because I don't understand most of them (my knowledge of cookies is quite limited).

The site in question is CurseForge. If anyone could point me into the right direction, it would be great.

Answers


You can check this variant of httplib2 http://gnu.gabrielfalcao.com/bolacha/#uploading-a-file , it has examples on that page. You can get the code from http://github.com/gabrielfalcao/bolacha/tree/master


I ended up solving the issue using Requests.


Need Your Help

Using getJSON() on CakePHP framework

php jquery ajax json cakephp

I'm using AJAX to check whether a username is in the database or not. Here is the controller code:

rails I18n wrong parameter order in route (id as locale and id is nil)

ruby-on-rails ruby rails-i18n i18n-gem

I want to internationalize an external code (see github) with i18n for rails. I have read the guide for Rails Internationalization (I18n) API. Translating the text is not a problem, but the underly...