task4.py 368 B

1234567891011121314151617
  1. """
  2. @author: luojunhui
  3. """
  4. import requests
  5. def update_articles(gh_id):
  6. """
  7. :param gh_id:
  8. :return:
  9. """
  10. url = "http://61.48.133.26:6060/article_crawler"
  11. headers = {"Content-Type": "application/json"}
  12. body = {"ghId": gh_id}
  13. response = requests.request("POST", url=url, headers=headers, json=body, timeout=20)
  14. print(response.json())