ipykernel-helper 0.0.9__tar.gz → 0.0.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ipykernel-helper might be problematic. Click here for more details.
- {ipykernel_helper-0.0.9/ipykernel_helper.egg-info → ipykernel_helper-0.0.11}/PKG-INFO +3 -1
- ipykernel_helper-0.0.11/ipykernel_helper/__init__.py +2 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper/core.py +14 -3
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11/ipykernel_helper.egg-info}/PKG-INFO +3 -1
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/requires.txt +2 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/settings.ini +2 -2
- ipykernel_helper-0.0.9/ipykernel_helper/__init__.py +0 -2
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/LICENSE +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/MANIFEST.in +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/README.md +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper/_modidx.py +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/SOURCES.txt +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/dependency_links.txt +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/entry_points.txt +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/not-zip-safe +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/top_level.txt +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/pyproject.toml +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/setup.cfg +0 -0
- {ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ipykernel-helper
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.11
|
|
4
4
|
Summary: Helpers for ipykernel and friends
|
|
5
5
|
Home-page: https://github.com/AnswerDotAI/ipykernel-helper
|
|
6
6
|
Author: Jeremy Howard
|
|
@@ -23,6 +23,8 @@ Requires-Dist: toolslm>=0.2.0
|
|
|
23
23
|
Requires-Dist: jedi
|
|
24
24
|
Requires-Dist: ipython
|
|
25
25
|
Requires-Dist: ipykernel
|
|
26
|
+
Requires-Dist: beautifulsoup4
|
|
27
|
+
Requires-Dist: html2text
|
|
26
28
|
Provides-Extra: dev
|
|
27
29
|
Dynamic: author
|
|
28
30
|
Dynamic: author-email
|
|
@@ -164,15 +164,26 @@ def read_url(
|
|
|
164
164
|
from bs4 import BeautifulSoup
|
|
165
165
|
|
|
166
166
|
res = httpx.get(url, follow_redirects=True).raise_for_status().text
|
|
167
|
+
soup = BeautifulSoup(res, "html.parser")
|
|
168
|
+
|
|
167
169
|
if selector:
|
|
168
|
-
sections =
|
|
170
|
+
sections = soup.select(selector)
|
|
169
171
|
if sections: res = '\n\n'.join(str(section) for section in sections)
|
|
170
172
|
else: res = ''
|
|
171
173
|
elif extract_section:
|
|
172
174
|
parsed = urlparse(url)
|
|
173
175
|
if parsed.fragment:
|
|
174
|
-
section =
|
|
175
|
-
if section:
|
|
176
|
+
section = soup.find(id=parsed.fragment)
|
|
177
|
+
if section:
|
|
178
|
+
tag_name = section.name
|
|
179
|
+
elements = [section]
|
|
180
|
+
current = section.next_sibling
|
|
181
|
+
while current:
|
|
182
|
+
if hasattr(current, 'name') and current.name == tag_name: break
|
|
183
|
+
elements.append(current)
|
|
184
|
+
current = current.next_sibling
|
|
185
|
+
res = ''.join(str(el) for el in elements)
|
|
186
|
+
else: res = ''
|
|
176
187
|
if as_md: return get_md(res)
|
|
177
188
|
return res
|
|
178
189
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ipykernel-helper
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.11
|
|
4
4
|
Summary: Helpers for ipykernel and friends
|
|
5
5
|
Home-page: https://github.com/AnswerDotAI/ipykernel-helper
|
|
6
6
|
Author: Jeremy Howard
|
|
@@ -23,6 +23,8 @@ Requires-Dist: toolslm>=0.2.0
|
|
|
23
23
|
Requires-Dist: jedi
|
|
24
24
|
Requires-Dist: ipython
|
|
25
25
|
Requires-Dist: ipykernel
|
|
26
|
+
Requires-Dist: beautifulsoup4
|
|
27
|
+
Requires-Dist: html2text
|
|
26
28
|
Provides-Extra: dev
|
|
27
29
|
Dynamic: author
|
|
28
30
|
Dynamic: author-email
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[DEFAULT]
|
|
2
2
|
repo = ipykernel-helper
|
|
3
3
|
lib_name = ipykernel-helper
|
|
4
|
-
version = 0.0.
|
|
4
|
+
version = 0.0.11
|
|
5
5
|
min_python = 3.9
|
|
6
6
|
license = apache2
|
|
7
7
|
black_formatting = False
|
|
8
|
-
requirements = fastcore toolslm>=0.2.0 jedi ipython ipykernel
|
|
8
|
+
requirements = fastcore toolslm>=0.2.0 jedi ipython ipykernel beautifulsoup4 html2text
|
|
9
9
|
cell_number = False
|
|
10
10
|
doc_path = _docs
|
|
11
11
|
lib_path = ipykernel_helper
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ipykernel_helper-0.0.9 → ipykernel_helper-0.0.11}/ipykernel_helper.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|