Last active
October 30, 2019 02:50
-
-
Save papadave66/8a331e1e52c2fe8eecc3c996b694d5b5 to your computer and use it in GitHub Desktop.
A spider for bilibili rank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
url='https://www.bilibili.com/ranking' | |
html = requests.get(url).text | |
pattern = re.compile(r'www\.bilibili\.com/video/av\d+') | |
videos = pattern.findall(html) | |
for vid in videos: | |
print('https://'+vid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment