結果
| 問題 | No.8107 Listening |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-01 23:42:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 464 bytes |
| コンパイル時間 | 493 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-30 22:52:49 |
| 合計ジャッジ時間 | 21,029 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 40 |
ソースコード
import requests
from bs4 import BeautifulSoup
from base64 import b64decode
url = "https://yukicoder.me/problems/no/3107"
r = requests.get(url)
soup = BeautifulSoup(r.text, 'lxml')
imgs = soup.find_all('img')
dat = b''
for img in imgs:
s = img.get('src')
if s.startswith('data:audio/mpeg;base64'):
dat = b64decode(s.replace('data:audio/mpeg;base64,', ''))
with open('apf.mpg', 'wb') as f:
f.write(dat)
スクレイピング用コード