structured data – How to efficiently get rich results for your blog page? I

Battery Exchange Network

The Stack Exchange network includes 176 question and answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange

python – 1: my spider gives me all the results in only one support on a file csv and 2 I can not do scraped scratches in the list of links that I just scratched

First, if I use extract_first, scrapy gives me the first item of each page and if I use it like that, it returns all the content I want, but in one line.

In the second place, I can not make sure that the links I just scratched are read and get information inside these links, by sending an empty csv file.

from the import of scrapy Spider
companies.items import CompaniesItem
import re

Business classSpider (Spider):
name = "companies"
allowed_domains = ['http://startup.miami',]
    # Set the list of scratch pages
start_urls = ["http://startup.miami/category/startups/page/" + str(1*i) + "/" for i in range(0, 10)]

    def parse (auto, answer):
rows = response.xpath (& # 39; // *[@id="datafetch"]& # 39;)

for row row:
link = row.xpath (.// h2 / a / @ href & # 39;). extract ()

name = row.xpath (.// header / h2 / a / text () & # 39;). extract ()

def parse_detaill_page (self, answer):
first_element_page = response.xpath (& # 39; .// p / a / @ href & # 39;). extract ()
first_element_page = & # 39; http: //startup.miami' + first_element_page
Request for return (Url = first_element_page, callback = self.parse_detaill_page)


item = CompaniesItem ()
article['link'] = link
article['name'] = name

performance article

python 3.x – Pymongo – Exclude a field from the results of a raw query

According to MongoEngine Docs on Raw Queries, a raw query can be used in Python when getting a collection of objects as follows:

Page.objects (__ raw __ = {tags:} & # 39; coding & # 39;}

What would be an example of using this method to exclude a particular field from the results?

ajax – The CPT search does not find the results from the title of the articles

I have a search bar to search for CPT (properties) on a page and display the results below, including on a map. The search works if you search by address, but does not work if I search by the name / title of the article.

I did not write this code, so I'm looking for a preview.
Thank you.

<a href = ""class =" btn-orderby "style =" margin-left: 15px; margin-bottom: 18px; "> Reset
        
        


views – How to display contextual filter results for arg1 / arg2 OR arg2 / arg1

I have a very simple view that displays the author's UID as well as the recipient's UID (of the entity). How do i show the results for arg1 / arg2 AND arg2 / arg1

First argument: UID of the author
Second argument: UID of entity

It works: my site / msg / 1/3
and this: my site / msg / 3/1

I need my opinion to display all the results regardless of the order of the arguments, but as there are two different fields, the option "Allow multiple values" does not seem not work.

Here is an export of my view
$ view = new view ();
$ view-> name = & # 39; newmessanger & # 39 ;;
$ view-> description = & # 39 ;;
$ view-> tag = & # 39; default;
$ view-> base_table = & # 39; node & # 39 ;;
$ view-> human_name = & # 39; newmessanger & # 39 ;;
$ view-> core = 7;
$ view-> api_version = 3.0 & # 39 ;;
$ view-> disabled = FALSE; / * Change this to true to make a default view disabled initially * /

/ * Display: Master /
$ handler = $ view-> new_display ('default', 'Master', & # 39; default & # 39;) & # 39;
$ handler-> display-> display_options[‘title’] = & # 39; newmessanger & # 39 ;;
$ handler-> display-> display_options[‘use_more_always’] = FALSE;
$ handler-> display-> display_options[‘access’][‘type’] = & # 39; perm & # 39;
$ handler-> display-> display_options[‘cache’][‘type’] = & # 39;
$ handler-> display-> display_options[‘query’][‘type’] = & # 39; views_query & # 39 ;;
$ handler-> display-> display_options[‘exposed_form’][‘type’] = & # 39; basic & # 39;
$ handler-> display-> display_options[‘pager’][‘type’] = & # 39;
$ handler-> display-> display_options[‘style_plugin’] = & # 39; table & # 39 ;;
$ handler-> display-> display_options[‘style_options’][‘columns’] = table (
& # 39; title & # 39; => & # 39; title & # 39;
& # 39; field_zmsgrecipient & # 39; => & # 39; field_zmsgrecipient & # 39;
& # 39; uid & # 39; => & # 39; uid & # 39;
)
$ handler-> display-> display_options[‘style_options’][‘class’] = & # 39 ;;
$ handler-> display-> display_options[‘style_options’][‘default’] = & # 39; -1 & # 39 ;;
$ handler-> display-> display_options[‘style_options’][‘info’] = table (
& # 39; title & # 39; => array (
& # 39; sortable & # 39; => 0,
& # 39; default_sort_order & # 39; => & # 39;
& # 39; align & # 39; => & # 39;
& # 39; separator & # 39; => & # 39;
& # 39; empty_column & # 39; => 0,
)
& # 39; field_zmsgrecipient & # 39; => array (
& # 39; sortable & # 39; => 0,
& # 39; default_sort_order & # 39; => & # 39;
& # 39; align & # 39; => & # 39;
& # 39; separator & # 39; => & # 39;
& # 39; empty_column & # 39; => 0,
)
& # 39; uid & # 39; => array (
& # 39; align & # 39; => & # 39;
& # 39; separator & # 39; => & # 39;
& # 39; empty_column & # 39; => 0,
)
)
/
Relation: Entity reference: Referenced entity /
$ handler-> display-> display_options[‘relationships’][‘field_zmsgrecipient_target_id’][‘id’] = & # 39; field_zmsgrecipient_target_id & # 39 ;;
$ handler-> display-> display_options[‘relationships’][‘field_zmsgrecipient_target_id’][‘table’] = & # 39; field_data_field_zmsgrecipient & # 39 ;;
$ handler-> display-> display_options[‘relationships’][‘field_zmsgrecipient_target_id’][‘field’] = & # 39; field_zmsgrecipient_target_id & # 39 ;;
/
Field: Content: Recipient /
$ handler-> display-> display_options[‘fields’][‘field_zmsgrecipient’][‘id’] = & # 39; field_zmsgrecipient & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘field_zmsgrecipient’][‘table’] = & # 39; field_data_field_zmsgrecipient & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘field_zmsgrecipient’][‘field’] = & # 39; field_zmsgrecipient & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘field_zmsgrecipient’][‘settings’] = table (
& # 39; bypass_access & # 39; => 0,
& # 39; link & # 39; => 0,
)
/
Field: Content: Author uid /
$ handler-> display-> display_options[‘fields’][‘uid’][‘id’] = 'Uid';
$ handler-> display-> display_options[‘fields’][‘uid’][‘table’] = & # 39; node & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘uid’][‘field’] = 'Uid';
$ handler-> display-> display_options[‘fields’][‘uid’][‘label’] = & # 39 ;;
/
Field: User: Uid /
$ handler-> display-> display_options[‘fields’][‘uid_1’][‘id’] = & # 39; uid_1 & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘uid_1’][‘table’] = & # 39;; & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘uid_1’][‘field’] = 'Uid';
$ handler-> display-> display_options[‘fields’][‘uid_1’][‘relationship’] = & # 39; field_zmsgrecipient_target_id & # 39 ;;
$ handler-> display-> display_options[‘fields’][‘uid_1’][‘label’] = & # 39; UID of the recipient & # 39 ;;
/
Sort criteria: Content: Date of shipment /
$ handler-> display-> display_options[‘sorts’][‘created’][‘id’] = & # 39 ;;;
$ handler-> display-> display_options[‘sorts’][‘created’][‘table’] = & # 39; node & # 39 ;;
$ handler-> display-> display_options[‘sorts’][‘created’][‘field’] = & # 39 ;;;
$ handler-> display-> display_options[‘sorts’][‘created’][‘order’] = & # 39; DESC & # 39;
/
Contextual filter: User: Uid /
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘id’] = & # 39; uid_1 & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘table’] = & # 39;; & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘field’] = 'Uid';
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘relationship’] = & # 39; field_zmsgrecipient_target_id & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘default_action’] = & # 39;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘default_argument_type’] = & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘default_argument_options’][‘user’] = FALSE;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘summary’][‘number_of_records’] = 0 & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘summary’][‘format’] = & # 39; default_summary & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘summary_options’][‘items_per_page’] = & # 39; 25 & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid_1’][‘break_phrase’] = TRUE;
/
Contextual filter: Content: Author uid /
$ handler-> display-> display_options[‘arguments’][‘uid’][‘id’] = 'Uid';
$ handler-> display-> display_options[‘arguments’][‘uid’][‘table’] = & # 39; node & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘field’] = 'Uid';
$ handler-> display-> display_options[‘arguments’][‘uid’][‘default_action’] = & # 39;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘default_argument_type’] = & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘default_argument_options’][‘user’] = FALSE;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘summary’][‘number_of_records’] = 0 & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘summary’][‘format’] = & # 39; default_summary & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘summary_options’][‘items_per_page’] = & # 39; 25 & # 39 ;;
$ handler-> display-> display_options[‘arguments’][‘uid’][‘break_phrase’] = TRUE;
/
Filter criteria: Content: Posted status * /
$ handler-> display-> display_options[‘filters’][‘status’][‘id’] = & # 39 ;; status;
$ handler-> display-> display_options[‘filters’][‘status’][‘table’] = & # 39; node & # 39 ;;
$ handler-> display-> display_options[‘filters’][‘status’][‘field’] = & # 39 ;; status;
$ handler-> display-> display_options[‘filters’][‘status’][‘value’] = 1;
$ handler-> display-> display_options[‘filters’][‘status’][‘group’] = 1;
$ handler-> display-> display_options[‘filters’][‘status’][‘expose’][‘operator’] = FALSE;

/ * Display: Page * /
$ handler = $ view-> new_display ('page', 'page', & 'page;'); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;
$ handler-> display-> display_options[‘path’] = Msg /% /% & # 39 ;;

Do you stop after 300 results?

Hi guys,

I'm trying to scratch LinkedIn profiles for some job titles. When I cast it, it stops at 300 results each time. The search I'm trying to erase indicates that Google has produced 2 million results, but I can only get 300 results in total.

Here are the details:

URL I'm scraping: Site: linkedin.com (inurl: inurl: pub) -intitle: directory -inurlConfusedalaries -inurl: dir -inurl: Jobs "Director of Information Technology" Note: The article published on the forum converts "wages of the colon" into emoji.
Proxies: Using proxies collected via the SB proxy manager. At the moment, 168 agents have passed the Google proxy test.

I've tried using the detailed harvest and the custom harvester. Same result. I've also reloaded the parameters of the custom harvester to see if anything had changed.

Anyone have any suggestions?

seo – How can I change the description that Google shows in the search results of a 301 redirect URL?

We have transferred our domain from our old CMS to our new one but we still have the same domain. Let's say our domain is now exemple.com.

I've googled our domain protein powder and a page from our old site appears. Now when you come to example.com/protein-powder on our new site, it was a 404. We created a 301 redirect: example.com/protein-powder at example.com/protein-pack.

Now, when you do the same search on Google, example.com/protein-powder still displays, but Google uses the meta description and the title of the old site. How can I change the description and title used by Google when it is already a 301 redirect?

probability or statistics – How to define a discrete distribution with non-integer sample space elements (results)?

I know how to define a discrete distribution with integer states:

        state: 1 2 3
P[X==state]   0.3 0.4 0.3

I want to define a discrete distribution with non integer states:

        State: 0.01 0.02 0.03
P[X==state]   0.3 0.4 0.3

It is possible to use By pieces[] and Probability distribution[] define a distribution with integer states.

pmf[x_] : = By pieces[{
      {0.3, x == 1}
    , {0.4, x == 2}
    , {0.3, x == 3}
    }];
distribution = ProbabilityDistribution[pmf[x], {x, 1, 3, 1}

;

enter the description of the image here

But Probability distribution[] seems unable to work with non-integer states (it does not even work with integer states with $ dx = $ 2)

Is it a bug, a feature or a convention?

enter the description of the image here


Question.

How to define the distribution of non-integer states (above)?

pmf[x_] : = By pieces[{
          {0.3, x == 0.01}
        , {0.4, x == 0.02}
        , {0.3, x == 0.03}
        }];
distribution = ProbabilityDistribution[pmf[x], {x, 0.01, 0.03, 0.01}];

Probability[X > .02, X [Distributed] Distribution] 

enter the description of the image here

Subtract two columns and add the results to another column

What would the syntax look like to subtract the Time_Exit – Time_Entry columns and add the results of each row in the column duration? I am using SQL Server 2012

enter the description of the image here

Changing the style of the search results page of the search API in Drupal 8

In Drupal 8, I try to customize the search results page. I use "Search API" and not "Search" by default of Drupal 8.

I have the /modules/search_api/templates/search-api-page.html.twig template file that I put in my custom theme

My question is, how can I customize (change css) the results that go into a variable: {{results}}

Here is the complete code of the page:

{{form}}

{% if search_title%}
  

{{}} Search_title

{% end if %} {% if no_of_results%}

{{}} No_of_results

{% end if %} {{}} No_results_found {{}} Search_help {{results}} {{}} Pager

Any help will be greatly appreciated.

Thank you