I want to show notifications of data inserted on the homepage of dashboard.
Dashboard has three pages of data insertion. I want to display information of data insertion on homepage.
<div class="content">
<div class="alert alert-info">
<span id = "t1">
<b> Task1 - </b> This is a regular notification made with ".alert-info"</span>
</div>
<div class="alert alert-success">
<span id = "t2">
<b> Task 2 - </b> This is a regular notification made with ".alert-success"</span>
</div>
<div class="alert alert-danger">
<span id = "t3">
<b> task 3 - </b> This is a regular notification made with ".alert-danger"</span>
</div>
</div>
Look at Materialize Toasts to popup an information box when a data is successfully added.
I think bootstrap only provides a css information box
Related
I'm able to scrape the company's name, location. Using the code below. But I'm facing difficulty to scrape the number of followers
Here is the HTML script for reference.
<div class="block mt2">
<div>
<h1 class="ember-view t-24 t-black t-bold full-width" id="ember28" title="Pacific Retail Capital Partners">
<span dir="ltr">Pacific Retail Capital Partners</span>
</h1>
<p class="org-top-card-summary__tagline t-16 t-black">
Our decades of experience and innovative strategies are transforming retail-led centers into high-performing properties.
</p>
<!-- -->
<div class="org-top-card-summary-info-list t-14 t-black--light">
<div class="org-top-card-summary-info-list__info-item">
Leasing Non-residential Real Estate
</div>
<!-- -->
<div class="inline-block">
<div class="org-top-card-summary-info-list__info-item">
El Segundo, CA
</div>
<!-- -->
<div class="org-top-card-summary-info-list__info-item">
4,047 followers
</div>
</div>
</div>
</div>
</div>
Scrapping company's name was easy and direct
info_div = soup.find('div', {'class' : 'block mt2'})
#print(info_div)
info_name = info_div.find_all('h1')
company_name = info_name[0].get_text().strip()
print(company_name, type(company_name),len(company_name))
Company location was accessed using this.
info_block = info_div.find_all('div', {'class' : 'inline-block'})
info_loc = info_block[0].find('div', {'class' : 'org-top-card-summary-info-list__info-item'}).get_text().strip()
print(info_loc)
How can I scrape/access second element i.e. 4047 followers ?
You can use the contains operator within the CSS selector, in this case we're searching for followers in a div with the specified class name:
followers_div = soup.select_one('.org-top-card-summary-info-list__info-item:contains(followers)')
This returns:
<div class="org-top-card-summary-info-list__info-item">
4,047 followers
</div>
Facing an Weird Issue in Vuejs.. I am using firestore to get data using props as id for the singlepost...
Now array formed is fine.. as you can see in the screenshot... there is no error in the console, i am seeing data... but its not working for its child key element.. attaching another screenshot of code.i guess if {{temple}} is working then {{temple.templename}} should work fine also
<div class="appCapsule">
{{temple}}
<div class="section mt-2">
<div class="card text-center">
<div class="card-header">
{{temple.templename}}
</div>
<div class="card-body">
<img v-bind:src="'https://awesong.in/jain/storage/temples/' + temple.fileToUpload1" style="width:100%">
<p class="card-text">Temple Type : {{temple.templetype}}</p>
<p class="card-text">Near By City : {{temple.nearbycity}}</p>
<p class="card-text">Built in : {{temple.built}}</p>
<p class="card-text">Address : {{temple.address}}</p>
<p class="card-text">Location : {{temple.location}}</p>
<p class="card-text">District : {{temple.district}}</p>
<p class="card-text">State : {{temple.state}}</p>
<p class="card-text">Phone : {{temple.phone}}</p>
<p class="card-text">Email : {{temple.email}}</p>
<p class="card-text">Website : {{temple.website}}</p>
<p class="card-text">Views : {{temple.clicks}}</p>
</div>
</div>
</div>
</div>
Image attached for reference
Temple is an array of JSON objects. You could use temple[0].property, or you could loop over it:
<div v-for="t in temple" :key="JSON.stringify(t)">
{{t.templename}} // etc
</div>
I am using scrapy to extract an item list into an array with the following info:
<div class="row">
<div class="col-md-4">
<p class="title">title info</p>
<p class="content">txt info</p>
</div>
<div class="col-md-4">
<p class="title">title info</p>
<p class="content">txt info</p>
</div>
</div>
Somehow my syntax seem to be wrong:
>>> response.xpath('//div[#class="row"]/div[#class="col-md-4"]/p/text()').extract()
[]
There might be another row class ahead of this item
You want to scrape https://www.watchmaster.com/de/bvlgari/automatic/bb38sl-auto/UELG3X5E7R page.
For example to collect Details from page it is better to add extra parent selector like here: response.css("div#watch-details-tab div.row div ::text").extract() to avoid collecting data from alike structures.
If you need to collect it by feature, try:
for row in response.css('div#watch-details-tab div.row div'):
k = row.css('p.title::text').get()
v = row.css('p.content::text').get()
# and then your logic for this data
<li class="tabRow tabRowLeft" *ngFor="let gene of filteredgene = (seq.genes) | limitTo:filteredgene.length/2+filteredgene.length%2">
<div class="displayFlex" (click)="showGeneRecord(gene.geneName,'ATTRIBUTE','.addPopup.attributeRisk')">
<div class="tabCell">
<div class="cellItem displayFlex">
<h4 class="flex1">{{gene.geneName}}</h4>
</div>
</div>
<div class="tabCell">
<div class="cellItem displayFlex">
<h4 class="flex1">{{gene.geneScore}}</h4>
</div>
</div>
</div>
</li>
I am trying to get the value in filteredgene and then for loop on filteredgene . I am getting error Bindings cannot contain assignments. Any one knows, what should I do resolve and get this thing done.
For limit to I have created a pipe too.
I'm trying to write a test script with flight booking tickets scenario like this: Randomly click a button which description contains keyword "tax not included",then results shows; Randomly click a button which not contains keyword, then price shows.
For instance: Go to ebay.com and search "iPhone",in the search result page,randomly click a url which label contains keyword "Buy It Now"...
Anybody got a clean solution to that? Thanks in advance.
I have no clue to handle this case...
here is my code:
public void flightSchedule(){
if (be.isTextPresent(locator.getValue("tax_text"), 1000)){ //if keywords displays
ArrayList<WebElement> lists = (ArrayList<WebElement>) be.getBrowserCore().findElements(contains(text(),'tax not included'));
Random random = new Random();
int ra = random.nextInt(lists.size());
WebElement element = (WebElement) lists.get(ra);
}
the page source code is:
<div id="itemBarXI151" class="avt_column avt_column_trans">
<div class="b_avt_lst">
<div class="avt_trans">
<div class="avt_column_1st">
<div class="avt_column_sp">
<p>
<span class="highlight">new york city</span>
(tax not included)
</p>
</div>
<div class="avt_column_2nd">
</div>
<div class="c6">
<div class="c7"> </div>
<div class="c8">
<div class="a_booking">
<a id="openwrapperbtnXI147" class="btn_book" title="booking tickets" onfocus="this.blur();" hidefocus="on" href="##" data-evtdataid="XI147">
<span>
<b>booking</b>
</span>
</a>
</div>
</div>
my xpath is:"//div[#class='avt_column avt_column_trans'] [contains(text(),'booking')]",but it doesn't work.