@danhachuel/thunderbolt 0.6.62 → 0.6.63

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.
@@ -223,7 +223,7 @@ def _extract_profile_user_from_html(document: str, username: str) -> dict[str, A
223
223
  biography = str(embedded_user.get('biography') or embedded_user.get('bio') or regex_biography or '').strip()
224
224
  print(f'embedded_user for @{username}: {embedded_user}')
225
225
  print(f'biography extracted for @{username}: {biography!r}')
226
- description = biography
226
+ description = biography or seo_description
227
227
  title = str(embedded_user.get('full_name') or embedded_user.get('name') or _meta(document, 'og:title') or username).split('(')[0].strip() or username
228
228
  avatar_url = str(embedded_user.get('profile_pic_url_hd') or embedded_user.get('profile_pic_url') or _meta(document, 'og:image')).strip()
229
229
 
@@ -249,7 +249,7 @@ def _extract_profile_user_from_html(document: str, username: str) -> dict[str, A
249
249
  user: dict[str, Any] = {
250
250
  'username': username,
251
251
  'full_name': title.split('(')[0].strip() or username,
252
- 'biography': biography,
252
+ 'biography': description,
253
253
  'edge_followed_by': {'count': followers} if followers is not None else {},
254
254
  'edge_follow': {'count': following} if following is not None else {},
255
255
  'edge_owner_to_timeline_media': {'count': post_count, 'edges': [{'node': post} for post in posts]},
@@ -257,7 +257,7 @@ def _extract_profile_user_from_html(document: str, username: str) -> dict[str, A
257
257
  'profile_pic_url': avatar_url,
258
258
  '_html_posts': posts,
259
259
  }
260
- return user if any((biography, followers, following, post_count, country, posts)) else {}
260
+ return user if any((description, followers, following, post_count, country, posts)) else {}
261
261
 
262
262
 
263
263
  def _fetch_web_profile_user(username: str) -> dict[str, Any] | None:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.6.62",
3
+ "version": "0.6.63",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",