Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56b2d84

Browse files
committed
handle config with xpath null/None
1 parent30e914a commit56b2d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎selectorlib/selectorlib.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def extract(self, html: str, base_url: str = None):
7373
returnfields_data
7474

7575
def_extract_selector(self,field_config,parent_parser):
76-
if'xpath'infield_config:
76+
iffield_config.get("xpath")isNone:
7777
elements=parent_parser.xpath(field_config['xpath'])
7878
else:
7979
css=field_config['css']

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp