fixed regex

This commit is contained in:
Ok 2020-01-29 01:25:21 +02:00
parent 610c3e8942
commit 771a89fc85

View File

@ -79,7 +79,7 @@ def get_title_and_urls(json_data):
def get_coub_data(html):
coub_data = r1(r'<script id=\'coubPageCoubJson\' type=\'text/json\'>([^<]+)</script>', html)
coub_data = r1(r'<script id=\'coubPageCoubJson\' type=\'text/json\'>([\w\W]+?(?=</script>))</script>', html)
json_data = json.loads(coub_data)
return json_data