Now everything uses lxml parser, which is faster than the standard's one
This commit is contained in:
Binary file not shown.
+3
-2
@@ -90,6 +90,7 @@ def search(showname2,date):
|
|||||||
date2 = post['date'].split('T')[0] # remove the time part
|
date2 = post['date'].split('T')[0] # remove the time part
|
||||||
tid = post['id']
|
tid = post['id']
|
||||||
if date2 == date:
|
if date2 == date:
|
||||||
|
print("HERE THE ID",tid)
|
||||||
return tid
|
return tid
|
||||||
|
|
||||||
def get_episode_link(season,episode,tid,base_url):
|
def get_episode_link(season,episode,tid,base_url):
|
||||||
@@ -105,11 +106,11 @@ def get_film(url):
|
|||||||
|
|
||||||
def get_real_link(tlink):
|
def get_real_link(tlink):
|
||||||
page = requests.get(tlink, headers=headers)
|
page = requests.get(tlink, headers=headers)
|
||||||
soup = BeautifulSoup(page.content, features="html.parser")
|
soup = BeautifulSoup(page.content, features="lxml")
|
||||||
iframe_src = soup.find('iframe')['src']
|
iframe_src = soup.find('iframe')['src']
|
||||||
|
|
||||||
iframe_page = requests.get(iframe_src, headers=headers)
|
iframe_page = requests.get(iframe_src, headers=headers)
|
||||||
iframe_soup = BeautifulSoup(iframe_page.content, features="html.parser")
|
iframe_soup = BeautifulSoup(iframe_page.content, features="lxml")
|
||||||
|
|
||||||
mega_button = iframe_soup.find('div', attrs={'class': 'megaButton', 'rel': 'nofollow'}, string='MIXDROP')
|
mega_button = iframe_soup.find('div', attrs={'class': 'megaButton', 'rel': 'nofollow'}, string='MIXDROP')
|
||||||
if mega_button:
|
if mega_button:
|
||||||
|
|||||||
Reference in New Issue
Block a user