Browse Source

Merge pull request #7225 from softcat/develop

Fixed filmstarts.de provider
pull/7222/merge
Ruud Burger 8 years ago
committed by GitHub
parent
commit
9039a30a3f
  1. 9
      couchpotato/core/media/movie/providers/userscript/filmstarts.py

9
couchpotato/core/media/movie/providers/userscript/filmstarts.py

@ -1,5 +1,6 @@
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from couchpotato.core.media._base.providers.userscript.base import UserscriptBase from couchpotato.core.media._base.providers.userscript.base import UserscriptBase
import re
autoload = 'Filmstarts' autoload = 'Filmstarts'
@ -15,16 +16,16 @@ class Filmstarts(UserscriptBase):
return return
html = BeautifulSoup(data) html = BeautifulSoup(data)
table = html.find("table", attrs={"class": "table table-standard thead-standard table-striped_2 fs11"}) table = html.find("section", attrs={"class": "section ovw ovw-synopsis", "id": "synopsis-details"})
if table.find(text='Originaltitel'): if table.find(text=re.compile('Originaltitel')): #some trailing whitespaces on some pages
# Get original film title from the table specified above # Get original film title from the table specified above
name = table.find("div", text="Originaltitel").parent.parent.parent.td.text name = name = table.find("span", text=re.compile("Originaltitel")).findNext('h2').text
else: else:
# If none is available get the title from the meta data # If none is available get the title from the meta data
name = html.find("meta", {"property":"og:title"})['content'] name = html.find("meta", {"property":"og:title"})['content']
# Year of production is not available in the meta data, so get it from the table # Year of production is not available in the meta data, so get it from the table
year = table.find(text="Produktionsjahr").parent.parent.next_sibling.text year = table.find("span", text=re.compile("Produktionsjahr")).findNext('span').text
return self.search(name, year) return self.search(name, year)

Loading…
Cancel
Save