r/redditdev • • May 21 '14

PRAW submit question

hi,

i am trying to submit a link to my sub, but i end up with a text post containing the link.

code i use to submit:

  r.submit('mysub', title, link)

The second problem is that links will be posted even though they exist already. There is a paramter in the submit method ("resubmit") but it doesnt do anything.

can someone help with the two problems?

84 Upvotes

27 comments sorted by

1

u/6086555 May 21 '14 edited May 21 '14

Instead of just putting link, replace by url=link. If you don't, the argument that you're giving is text :

here is the order of the arguments

submit(subreddit, title, text=None, url=None, captcha=None, save=None, send_replies=None, resubmit=None)

and don't worry about resubmit, it just doesn't work if your link is in a selfpost

1

u/totes_meta_bot Jun 18 '14 edited Jun 19 '14

This thread has been linked to from elsewhere on reddit.

If you follow any of the above links, respect the rules of reddit and don't vote or comment. Questions? Abuse? Message me ^here.

1

u/Mjone77 Jun 19 '14

salewfjowfiajfeelsoeijoigjaw

1

u/Mjone77 Jun 19 '14

feels oawjegj

1

u/sexxss Apr 16 '23

Rule 34

1

u/[deleted] May 20 '23

Rule34