Python? Beautiful Soup?? ? ????? ? ??: MIDI ?? ?
???? ??? ????? ?? API? ??? ????? ???? ???? ????? ?? ??? ? ????. Python? Beautiful Soup ?????? ? ????? ?? ???? ????? ?? ??? ? ?? ??? ???? ?????.
MIDI ???? ????? ??? Nintendo ??? ??? ???? ?? Magenta ???? ?????? ?? ?? ???????. VGM(??? ?? ?? ????)?? MIDI ??? ??? ?????.
?? ??
Python 3 ? pip? ???? ??? ?????. ???? ???? ?? ?? ??? ???? ????? ?? ?????.
pip install requests==2.22.0 beautifulsoup4==4.8.1
????? 4? ???? ????(????? 3? ? ?? ???? ????).
??? ???? ??? ??? ???? ? ?? ??
?? HTML? ??? BeautifulSoup ??? ??? ?????.
import requests from bs4 import BeautifulSoup vgm_url = 'https://www.vgmusic.com/music/console/nintendo/nes/' html_text = requests.get(vgm_url).text soup = BeautifulSoup(html_text, 'html.parser')
soup
??? ???? HTML? ??? ? ????. soup.title
? ??? ??? ?????. print(soup.get_text())
?? ???? ?????.
???? ??? ?? ??????
find()
? find_all()
???? ??????. soup.find()
? ?? ??? ??????(?: soup.find(id='banner_ad').text
? ?? ?? ???? ???). soup.find_all()
?? ??? ?????. ?? ?? ??? ?? ????? URL? ?????.
for link in soup.find_all('a'): print(link.get('href'))
find_all()
? ??? ???? ?? ?? ????? ?? ??? ?? ??? ?????. ?? ??? Beautiful Soup ??? ?????.
HTML ?? ? ?? ??
?? ??? ???? ?? ?????? ???? HTML? ?????. ? ????? ?????. ??? ???? ???? ??? ??? ??? ????.
??? ??? ?? ? ???? ??? ??? MIDI ??? ?????? ????. ???? ??? ??(??? ??? ?? ??, "??")? ????? ???? ???? HTML ??? ???? ? ??? ???.
???? ?? find_all()
? ???? MIDI ??? ??? ??? ???? ?????(??? ??? ?? ?? ??).
??? nes_midi_scraper.py
:
import re import requests from bs4 import BeautifulSoup vgm_url = 'https://www.vgmusic.com/music/console/nintendo/nes/' html_text = requests.get(vgm_url).text soup = BeautifulSoup(html_text, 'html.parser') if __name__ == '__main__': attrs = {'href': re.compile(r'\.mid$')} tracks = soup.find_all('a', attrs=attrs, string=re.compile(r'^((?!\().)*$')) count = 0 for track in tracks: print(track) count += 1 print(len(tracks))
MIDI ??? ????? ?? ??? ???? ? ??? ?????. python nes_midi_scraper.py
?? ?????.
MIDI ?? ????
?? ???? MIDI ??? ????? ?????. download_track
? nes_midi_scraper.py
??? ?????:
pip install requests==2.22.0 beautifulsoup4==4.8.1
? ??? ? ??? ?????? ??? ?? ???? ?????. ??? ?? ?????? ????? ??????. ? 2230?? MIDI ??? ?????? ???(????? ?? ???? ?? ??).
?? ??? ??
? ????? ?? ??? ?????? ?? ? ????. ???? ???? ?? ??? ??? ? ??? ?? ?????. ????? ?? ??? ?????. Mido(MIDI ??? ???) ? Magenta(??? ???)? ?? ?????? ???? ? ??? ?????.
? ??? Beautiful Soup? ???? Python?? ? ???? ? HTML ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Python? Unittest ? Pytest? ??? ? ???? ??, ?? ? ??? ????? ? ?? ?? ???? ??? ??? ?????. 1. ??? ??? ?? ??? ???? ??? ??? ??? ?????. UnitTest? ??? ??? ???? ???? Test \ _? ???? ???? ?????. Pytest? ? ?????. Test \ _?? ???? ?? ? ??????. 2. ??? ?? ?? ? ?? ? ??? ??? ????. UnitTest? Assertequal, AssertTrue ? ?? ??? ???? ?? Pytest? ??? Assert ?? ???? ?? ?? ??? ???? ?????. 3. ?? ??? ?? ? ?? ????? ????? ????.

pythonisidealfordataanalysisduetonumpyandpandas.1) numpyexcelsatnumericalcomputationsfast, multi-dimensionalArraysandectorizedOferationsLikenp.sqrt ()

?? ????? (DP)? ??? ??? ? ??? ?? ??? ??? ??? ? ??? ??? ?? ??? ???? ??? ????? ??????. ? ?? ?? ??? ????. 1. ??? (??) : ??? ?? ??? ???? ??? ???? ?? ??? ??????. 2. ??? (?) : ?? ???? ???? ????? ?????. ???? ???, ?? ?? ?? ?? ??/?? ?, ??? ??? ?? ?? ?? ??? ??? ????? ?????. ?????? ????? ?? ???? ?? ??? ? ???, ?? ??? ???? ?? ?? ??? ???? ??? ???? ????? ???? ???????.

??? ?? ???? ????? ????? __iter_ ? __next__ ???? ???????. ① __iter__ ???? ??? ? ?? ??? ???? ??? ?? ?? ??? ?????. ② __next__ ???? ? ??? ?? ????, ?? ??? ??? ????, ? ?? ??? ??? stopiteration ??? ??????. status ??? ???? ??????? ?? ??? ??? ?? ?? ??? ???????. pile ?? ?? ???? ?? ??? ?? ? ??? ?? ? ??? ?????? ?????. simple ??? ??? ?? ?? ??? ?? ???? ???? ?? ??? ? ??? ?? ????? ???? ??? ??? ???????.

Python? ?? ???? ?? ???, ?? ?? ????, ?? ???? ?? ? AI/ML ??? ???? ??? ?????. ??, Cpython? ???? ????? ?? ??, ?? ?? ??? ? ?? ? ?? ??? ?? ??? ??????. ??, ??? ????? ?? ?? ? ?? ??? ????? ?? ?? ? ? ??? ?? ?????. ??, Pyscript ? Nuitka? ?? ?? ???? ??? ??? ?? ??? ?????. ?????, AI ? ??? ?? ??? ?? ???? ??? ?? ???????? ???? ?? ? ??? ?????. ??? ??? Python? ??? ??? ????? ???? ?? ??? ???? ??? ?????.

Python? ?? ??? ???? ?????? ????, ????? ? ?? ??????? ???? ? ??? ??? ???? ?? ??? ?????. ?? TCP ??? ????? Socket.Socket ()? ???? ??? ??? ?? ? ??? ????? .listen ()? ???? ??? ?? .accept ()? ?? ????? ??? ???????. TCP ?????? ????? ?? ??? ??? ??? ????? .connect ()? ?? ? ?? .sendall ()? ???? ???? ??? .recv ()? ?? ??? ??????. ?? ?????? ????? 1. ??? : ??? ??? ? ???? ??? ? ????. 2. ??? I/O : ?? ??, Asyncio ?????? ? ??? ??? ?? ? ? ????. ???? ? ?

???? Python ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????

Python List ????? ?? ?? ??? [Start : End : Step] ??? ????? ??? ???? ????. 1. ?? ????? ?? ??? ?? [start : end : step]???. ??? ?? ??? (??), ?? ? ??? (???? ??)?? ??? ?? ?????. 2. ????? ???? 0?? ????? ???? ????? ??? ??? ???? ????? ??? 1? ??????. 3. my_list [: n]? ???? ? ?? n ??? ?? my_list [-n :]? ???? ??? n ??? ????. 4. My_List [:: 2]? ?? ??? ?? ?? ??? ???? ??? ??? ?? ?? ?? ??? ???? ? ????. 5. ???? ???? ? ???? ???? ????
