我正在构建一个应用程序,并希望通过单击按钮自动发布到craigslist.有没有办法做到这一点?
我有一个帐户,将支付每个帖子.
我正在浏览craigslist批量发布部分,它需要将rss源发送到服务器以自动发布添加该站点的位置
http://www.craigslist.org/about/bulk_posting_interface
我已经查找了一个php类的样本,但无法找到.有谁知道存在的任何类?谢谢
我正在开发一个网站,我希望通过匿名化他们的电子邮件地址来保护买家.与craigslist的系统类似,当卖家需要联系买家时,他们应该能够发送电子邮件到匿名地址,如1425415125 @ mysite.然后将com路由到用户的电子邮件地址.
我现在的计划是:
我的问题如下:
提前致谢
J.P
我知道,我知道 - 它可能不会(也不应该)重要 - 我已经阅读了这条评论.但作为一个刚刚学习Python的新手,我非常感兴趣.该来源似乎几次引用Javascript - 整个网站是否会在此?关于网站背后的其他技术堆栈的任何想法?
查看我的一些最喜欢的网站背后的技术被证明是一种非常有趣的方式来了解各种语言/框架的优缺点.
编辑:不要听起来像考试,但给出你的答案的原因:-)例如.你为什么不建议跟随他们的脚步?
我正在尝试使用PHP和cURL登录网站(即Craigslist).访问脚本时,我收到以下警告消息:
Received problem 2 in the chunky parser
Run Code Online (Sandbox Code Playgroud)
搜索表明它不是与cURL相关的问题.我无法找到问题的根源.可能是什么原因?
谢谢.
我正在使用以下代码登录Craigslist,但还没有成功.
string formParams = string.Format("inputEmailHandle={0}&inputPassword={1}", "must_chd@yahoo.com", "removed");
//string postData = "inputEmailHandle=must_chd@yahoo.com&inputPassword=removed";
string uri = "https://accounts.craigslist.org/";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.KeepAlive = true;
request.ProtocolVersion = HttpVersion.Version10;
request.Method = "POST";
byte[] postBytes = Encoding.ASCII.GetBytes(formParams);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postBytes.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(postBytes, 0, postBytes.Length);
requestStream.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
cookyHeader = response.Headers["Set-cookie"];
string pageSource;
string getUrl = "https://post.craigslist.org/del";
WebRequest getRequest = WebRequest.Create(getUrl);
getRequest.Headers.Add("Cookie", cookyHeader);
WebResponse getResponse = getRequest.GetResponse();
using (StreamReader sr = new StreamReader(getResponse.GetResponseStream()))
{
pageSource = …
Run Code Online (Sandbox Code Playgroud) 我需要通过他们的API自动将消息发布到craigslist.org.
以下是craigslist发布API的最新参考资料(2013年12月2日更新):http: //www.craigslist.org/about/bulk_posting_interface
他们有一个非常好的干净API,唯一的问题似乎是你必须提供的cl:auth元素:
<cl:auth username="listuser@bogus.com" password="p0stp@rty" accountID="14"/>
Run Code Online (Sandbox Code Playgroud)
他们将accountID描述为:具有足够块信用(或开票帐户)的craigslist帐号,其中提供的用户名是此accountID的授权买家.
我在craigslist.org上找不到任何定价信息或详细信息.
如何授权我的帐户发布消息?如何获得有效的帐户ID?
我想要做的是允许用户使用PHP curl通过我自己的网站向Craiglist发帖.这不是一个自动发布系统,我只希望用户能够同时发布到Craigslist和我的网站.到目前为止,我已经设法使用PHP登录,但我仍然不确定如何发布标题,描述,联系信息等.我不熟悉cURL.
在windows10上使用python3,selenium和firefox:这个程序很简单.它直接跳到craigslists'发布新的列表'页面,上传多张照片,然后提交.我遇到的问题是我无法通过selenium控制对话框导航到正确的文件.
browser = webdriver.Firefox()
browser.get('https://post.craigslist.org/k/lPbhT6Lh5RGBKb-uS1zr0g/g2NjN?lang=en&cc=us&s=editimage')
#opens to craigslists 'Upload/Edit Images' page
add_imgs_btn = browser.find_element_by_id('plupload')
#find the 'add images' button
add_imgs_btn.click()
#clicks the button which opens the dialog box, which is not operable from selenium
add_imgs_btn.send_keys(filepath)
Run Code Online (Sandbox Code Playgroud)
我一直在做一些阅读,我得到了我需要使用send_keys()到'输入文件'的要点,但我仍然是如此新的硒和编程一般,我不完全理解这个概念.我的想法是使用AutoIt的SendKeys,但我甚至无法弄清楚为什么AutoIt不会安装到我的电脑上.所以,我希望有人可以说明如何发送预先确定的路径名,以便我可以上传照片.任何帮助表示赞赏,谢谢!
我发现的只是这个使用 Rails 的问题:Email Forwarding like Craigslist - Rails
我用 google 搜索了很长时间,但找不到任何使用 Node.js 的东西。
我知道这不是通常接受的问题,但此时我确实没有其他办法。
您能给我指出一个我可以使用的资源或一些教程吗?或者也许您知道自己该怎么做?
编辑:我最终使用了 Sendgrid。
我正在尝试在craigslist sfbay.craigslist.org上进行HTTP GET .这是我的(ruby)代码,非常简单
require 'net/http'
result = Net::HTTP.get(URI.parse('http://sfbay.craigslist.org'))
Run Code Online (Sandbox Code Playgroud)
我最终收到错误"此IP已被自动阻止."
只有当我从Amazon EC2或heroku上尝试此操作时才会出现此问题.当我在我自己的计算机localhost上再次尝试时,我得到了正确的结果.这与Amazon EC2有关吗?
我想知道其他人是否有同样的问题.如何从EC2访问craigslist?
我想要做的是允许用户使用PHP curl通过我自己的网站向Craiglist发帖.这不是一个自动发布系统,我只希望用户能够同时发布到Craigslist和我的网站.到目前为止,我已经设法使用PHP登录,但我仍然不确定如何发布标题,描述,联系信息等.我不熟悉cURL.
我正在处理通过Google找到的脚本:
<?php
// INIT CURL
$ch = curl_init();
// SET URL FOR THE POST FORM LOGIN
curl_setopt($ch, CURLOPT_URL, 'https://accounts.craigslist.org/');
// ENABLE HTTP POST
$email = "email";
$pass = "pass";
$url = "inputEmailHandle=".urlencode($email)."&inputPassword=".urlencode($pass);
curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $url);
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
ob_start();
curl_exec ($ch);
ob_end_clean(); // execute the curl command
curl_close ($ch);
unset($ch);
//initialize second curl
$ch = curl_init(); …
Run Code Online (Sandbox Code Playgroud) craigslist ×12
php ×3
api ×2
c# ×2
curl ×2
email ×2
javascript ×2
amazon-ec2 ×1
anonymize ×1
html ×1
http ×1
node.js ×1
oop ×1
post ×1
python-3.5 ×1
rss ×1
selenium ×1