teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

URL

2021/01/25 23:57

投稿

hfjdsfh_48
hfjdsfh_48

スコア13

title CHANGED
File without changes
body CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  def job():
16
16
  tr=""
17
- resp = requests.get(f"https://webapi.yanoshin.jp/webapi/tdnet/list/8818.json2?limit=100")
17
+ resp = requests.get("https://webapi.yanoshin.jp/webapi/tdnet/list/8818.json2?limit=100")
18
18
  data = resp.json()
19
19
  result = []
20
20
  for item in data.get("items", []):

1

アクセストークンがそのままでした

2021/01/25 23:57

投稿

hfjdsfh_48
hfjdsfh_48

スコア13

title CHANGED
File without changes
body CHANGED
@@ -49,13 +49,7 @@
49
49
  for r in result:
50
50
  data=f"{r['name']} {r['title']} {r['url']}"
51
51
  print(data)
52
- url = "https://notify-api.line.me/api/notify"
52
+
53
- access_token = 'VV6ArQXmDCUryKftPoMZxjjtn2WxryxTWOJqnYNGvs6'
54
- headers = {'Authorization': 'Bearer ' + access_token}
55
- message = data
56
- params = {'message': message}
57
- r = requests.post(url, headers=headers, params=params,)
58
-
59
53
  old_file=tr
60
54
 
61
55
  schedule.every(1).seconds.do(job)