File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ def videos(self):
97
97
]
98
98
return []
99
99
100
+ @cached_property
101
+ def pdf_hash (self ):
102
+ return self .attrib .get ("pdf_hash" , None )
103
+
100
104
def _parse_revision_or_errata (self , tag ):
101
105
for item in self .attrib .get (tag , []):
102
106
# Expand URLs with paper ID
Original file line number Diff line number Diff line change 20
20
import re
21
21
import requests
22
22
import shutil
23
+ import subprocess
23
24
24
25
from lxml import etree
25
26
from urllib .parse import urlparse
@@ -415,11 +416,13 @@ def parse_element(xml_element):
415
416
elif tag == "url" :
416
417
tag = "xml_url"
417
418
value = element .text
419
+ attrib ['pdf_hash' ] = element .get ("hash" )
418
420
elif tag == "attachment" :
419
421
value = {
420
422
"filename" : element .text ,
421
423
"type" : element .get ("type" , "attachment" ),
422
424
"url" : element .text ,
425
+ "hash" : element .get ("hash" ),
423
426
}
424
427
elif tag in ("author" , "editor" ):
425
428
id_ = element .attrib .get ("id" , None )
You can’t perform that action at this time.
0 commit comments