Skip to content

Instantly share code, notes, and snippets.

@papadave66
Last active October 30, 2019 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papadave66/8a331e1e52c2fe8eecc3c996b694d5b5 to your computer and use it in GitHub Desktop.
Save papadave66/8a331e1e52c2fe8eecc3c996b694d5b5 to your computer and use it in GitHub Desktop.
A spider for bilibili rank
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