Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to parse value from <b> #210

Open
AMJ-7 opened this issue Feb 16, 2022 · 1 comment
Open

how to parse value from <b> #210

AMJ-7 opened this issue Feb 16, 2022 · 1 comment

Comments

@AMJ-7
Copy link

AMJ-7 commented Feb 16, 2022

how can get value from: Category

<html>
 <head></head>
 <body>
  We are looking for a developer who is experienced in IOS DJI SDK, as well as general drone operating systems.
  <br>
  <br> Your role will be to develop our app based on our android system
  <br>
  <br> We are looking for a detailed person who is and available.
  <br>
  <br> We are looking for long term support:
  <br>
  <br> Please utilise and upload exisiting scope as discussed
  <br>
  <br>
  <b>Hourly Range</b>: $15.00-$19.00 
  <br>
  <b>Posted On</b>: February 16, 2022 04:21 UTC
  <br>
  <b>Category</b>: Mobile App Development
  <br>
  <b>Skills</b>:Virtual Reality, User Authentication, User Profile Creation, iOS, iOS Development, Swift, Smartphone, In-App Purchases, Tablet 
  <br>
  <b>Country</b>: Canada 
  <br>
  <a href="https://www.upwork.com/jobs/IOS-App-Developer-Existing-App_%7E01baae95ea4c434ade?source=rss">click to apply</a> 
 </body>
</html>


@MuhammedZakir
Copy link

Why not use either regex or AWK+regex for this?

WIth SwiftSoup: Parse html and use selector syntax [1] using a CSS query like body > b:eq(2) (b:eq(2) because Category is inside third b element). You may use :containsOwn or :matchesOwn pseudo selector rather than :eq if those elements' position will change. After that, call nextElementSibling method on the result you got to get the text after that b element. I haven't tried this, but this should work IIAR.

[1] https://github.com/scinfu/SwiftSoup#use-selector-syntax-to-find-elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants