Tweepy转推了一条推文,而不是特定用户的转推

时间:2020-07-20 19:23:59

标签: python twitter tweepy

我想要一个Python脚本,该脚本可以转推特定用户的第一个推文(除了已转推的推文),而且我还需要我的脚本等到该用户的下一个新推文而没有任何错误。

这是我的代码。

2020-07-20T19:14:14.942897+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:14:15.107412+00:00 app[worker.1]: Retweeted the tweet
2020-07-20T19:14:15.338986+00:00 app[worker.1]: Favorited the tweet
2020-07-20T19:15:55.439246+00:00 app[worker.1]: 
2020-07-20T19:15:55.439254+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:15:55.600534+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:15:55.600885+00:00 app[worker.1]: 
2020-07-20T19:15:55.600931+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:15:55.826920+00:00 app[worker.1]: Retweeted the tweet
2020-07-20T19:15:56.073870+00:00 app[worker.1]: Favorited the tweet
2020-07-20T19:17:36.170559+00:00 app[worker.1]: 
2020-07-20T19:17:36.170571+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:36.318615+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:36.318625+00:00 app[worker.1]: 
2020-07-20T19:17:36.318627+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:36.449891+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:36.449968+00:00 app[worker.1]: 
2020-07-20T19:17:36.449969+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:36.616007+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:36.616013+00:00 app[worker.1]: 
2020-07-20T19:17:36.616013+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:36.772800+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:36.902772+00:00 app[worker.1]: 
2020-07-20T19:17:36.902775+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:37.062581+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:37.062598+00:00 app[worker.1]: 
2020-07-20T19:17:37.062599+00:00 app[worker.1]: Tweet by: @Trump
2020-07-20T19:17:37.225377+00:00 app[worker.1]: [{'code': 327, 'message': 'You have already retweeted this Tweet.'}]
2020-07-20T19:17:37.393882+00:00 heroku[worker.1]: Process exited with status 0
2020-07-20T19:17:37.428045+00:00 heroku[worker.1]: State changed from up to crashed

我在转发推文的脚本之后遇到的错误。

{
  "proxy": "http://localhost:5000",
  "name": "276_project",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "axios": "^0.19.2",
    "bulma": "^0.9.0",
    "jwt-decode": "^2.2.0",
    "node-sass": "^4.14.1",
    "react": "^16.13.1",
    "react-bootstrap": "^1.2.2",
    "react-cart-components": "^2.1.0",
    "react-dom": "^16.13.1",
    "react-hook-form": "^5.7.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "3.4.1",
    "react-stripe-checkout": "^2.6.3",
    "react-toastify": "^6.0.6",
    "serve": "^11.3.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "heroku-postbuild": "npm run build"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

0 个答案:

没有答案