task4.py 414 B

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