Update things, delete things, add things

This commit is contained in:
RussellChamp committed 2019-03-15 10:20:44 -04:00
1 parent 772995c0ff
commit a8b397a44f
31 files changed
+347 -803

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/python3
import requests
from bs4 import BeautifulSoup
# These seem to get the same result each time we run them. I think TVTropes
# has some anti-scraping mechanism
def getTrope():
url = "https://tvtropes.org"
html = BeautifulSoup(requests.get(url).content, "html.parser")
return url + html.find('a', { 'class': 'button-random-trope' })['href']
def getMedia():
url = "https://tvtropes.org"
html = BeautifulSoup(requests.get(url).content, "html.parser")
return url + html.find('a', { 'class': 'button-random-media' })['href']