소스 검색

adjust the gallery pattern

Martin 7 년 전
부모
커밋
5a3d7b6658
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  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 .*?>'),