Browse Source

adjust the gallery pattern

Martin 7 năm trước cách đây
mục cha
commit
5a3d7b6658
1 tập tin đã thay đổi với 1 bổ sung và 1 xóa
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -165,7 +165,7 @@ def main(dest_path, xml_files):
 
     p1 = re.compile(r'(\[caption.*?\])?<a href="(http[^>]*?)"><img[^>]*? src="(http[^>]*?)"[^>]*?></a>([^<]*?\[/caption\])?')
     p3 = re.compile(r'(\[caption.*?\])?<img[^>]*? src="(http[^>]*?)"[^>]*?>([^<]*?\[/caption\])?')
-    p4 = re.compile(r'\[gallery.*?ids="(.*?)"\]')
+    p4 = re.compile(r'\[gallery.*?ids="([^"]*?)".*?\]')
 
     drop_patterns = {
         re.compile(r'<span .*?>'),